View Issue Details

IDProjectCategoryView StatusLast Update
0001416OpenMPTGeneralpublic2021-12-25 18:54
Reportermanx Assigned Tomanx  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionOpenMPT 1.30.00.* (old testing) 
Fixed in VersionOpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first) 
Summary0001416: run clang-format on soundbase/, and sounddev/
Description

Changes in these directories are rather minimal.

TagsNo tags attached.
Attached Files
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Relationships

related to 0001105 assignedmanx clang-format support 

Activities

manx

manx

2021-02-16 14:40

administrator   ~0004637

clang-format 10 (and 11) still have serious trouble formatting

                info.flags = {
                        sysInfo.SystemClass == mpt::OS::Class::Windows ? sysInfo.IsWindowsOriginal() ? Info::Usability::Usable : Info::Usability::Experimental : Info::Usability::NotAvailable,
                        Info::Level::Primary,
                        Info::Compatible::No,
                        sysInfo.SystemClass == mpt::OS::Class::Windows && sysInfo.IsWindowsOriginal() ? Info::Api::Native : Info::Api::Emulated,
                        Info::Io::FullDuplex,
                        Info::Mixing::Hardware,
                        Info::Implementor::OpenMPT
                };

to something even remotely useful.

We should defer further clang-format on sounddev/ until Visual Studio comes with a newer clang-format.

manx

manx

2021-02-16 14:43

administrator   ~0004638

soundbase/ done in r14171

manx

manx

2021-03-01 10:43

administrator   ~0004672

AlignConsecutiveAssignments: true causese wrapped struct initialization to break. AlignConsecutiveAssignments: false solves this, but pratically breaks aligned enum declarations.

manx

manx

2021-03-01 10:48

administrator   ~0004673

Last edited: 2021-03-01 10:49

As we do not generally align consecutive assignments in code, this is the more logical setting anyway. As a work-around for breaking enums, we can use // clang-format offand // clang-format on around enums.

The problem with initialization with this setting is, that the expressions are considered individual assignments by clang-format and are thus aligned by spaces, instead of our approach of indenting them with 1 tab.

manx

manx

2021-12-25 18:53

administrator   ~0004972

Issue History

Date Modified Username Field Change
2021-02-14 13:08 manx New Issue
2021-02-14 13:08 manx Status new => assigned
2021-02-14 13:08 manx Assigned To => manx
2021-02-14 13:08 manx File Added: clang-format-sound-v1.patch
2021-02-14 13:09 manx Relationship added related to 0001105
2021-02-16 14:40 manx Note Added: 0004637
2021-02-16 14:43 manx Note Added: 0004638
2021-02-16 14:43 manx Target Version OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first) => OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first)
2021-03-01 10:43 manx Note Added: 0004672
2021-03-01 10:48 manx Note Added: 0004673
2021-03-01 10:49 manx Note Edited: 0004673
2021-12-25 18:53 manx Status assigned => resolved
2021-12-25 18:53 manx Resolution open => fixed
2021-12-25 18:53 manx Fixed in Version => OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)
2021-12-25 18:53 manx Note Added: 0004972
2021-12-25 18:54 manx Target Version OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) =>