Skip to content

Commit f343dd4

Browse files
committed
Update and fix formatting
1 parent 4d9c555 commit f343dd4

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

.clang-format

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ AlwaysBreakBeforeMultilineStrings: false
2020
AlwaysBreakTemplateDeclarations: true
2121
BinPackArguments: true
2222
BinPackParameters: true
23-
BraceWrapping:
23+
BraceWrapping:
2424
AfterClass: true
2525
AfterControlStatement: true
2626
AfterEnum: true
@@ -55,7 +55,7 @@ DisableFormat: false
5555
ExperimentalAutoDetectBinPacking: false
5656
FixNamespaceComments: true
5757
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, BOOST_REVERSE_FOREACH, RTTR_FOREACH_PT ]
58-
IncludeCategories:
58+
IncludeCategories:
5959
- Regex: '[dD]efines.h'
6060
Priority: -1
6161
- Regex: '^"world/'
@@ -70,15 +70,21 @@ IncludeCategories:
7070
Priority: 50
7171
- Regex: '^(<|")lib.*/'
7272
Priority: 90
73-
- Regex: '^<boost/'
73+
- Regex: '^(<|")s25util.*/'
74+
Priority: 90
75+
- Regex: '(<|")rttr/'
76+
Priority: 90
77+
- Regex: '<(utf8.h|kaguya|turtle|glad|KHR)'
78+
Priority: 95
79+
- Regex: '<boost/'
7480
Priority: 99
7581
- Regex: '^<windows'
7682
Priority: 100
7783
- Regex: '^<'
7884
Priority: 110
7985
- Regex: '.*'
8086
Priority: 1
81-
IncludeIsMainRegex: '(Impl)?$'
87+
IncludeIsMainRegex: '(Impl|_Win32|_Other)?$'
8288
IndentCaseLabels: true
8389
IndentWidth: 4
8490
IndentWrappedFunctionNames: false
@@ -114,6 +120,6 @@ SpacesInContainerLiterals: false
114120
SpacesInCStyleCastParentheses: false
115121
SpacesInParentheses: false
116122
SpacesInSquareBrackets: false
117-
Standard: Cpp03
123+
Standard: Cpp11
118124
TabWidth: 4
119-
UseTab: Never
125+
UseTab: Never

examples/chTransparentIdx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ include(EnableWarnings)
1616
enable_warnings(chTransparentIdx)
1717

1818
if(ClangFormat_FOUND)
19-
add_clangFormat_files(${_sources})
19+
add_clangFormat_files(chTransparentIdx.cpp)
2020
endif()

examples/outline/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ include(EnableWarnings)
1313
enable_warnings(outline)
1414

1515
if(ClangFormat_FOUND)
16-
add_clangFormat_files(${_sources})
16+
add_clangFormat_files(outline.cpp)
1717
endif()

include/libsiedler2/Archiv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Archiv
7272
ArchivItem* operator[](size_t index) { return get(index); }
7373

7474
private:
75-
std::vector<std::unique_ptr<ArchivItem> > data; /// elements
75+
std::vector<std::unique_ptr<ArchivItem>> data; /// elements
7676
};
7777
} // namespace libsiedler2
7878

src/ArchivItem_Bob.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int libsiedler2::ArchivItem_Bob::load(std::istream& file, const ArchivItem_Palet
113113
std::vector<bool> loaded(numGoodImgs, false);
114114

115115
std::vector<uint8_t> heights(numGoodImgs);
116-
std::vector<std::vector<uint16_t> > starts(numGoodImgs);
116+
std::vector<std::vector<uint16_t>> starts(numGoodImgs);
117117
std::vector<uint8_t> ny(numGoodImgs);
118118

119119
for(uint16_t i = 0; i < numGoodImgs; ++i)

tests/testClone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE(CloneFromBasePtr)
8989
auto f = std::make_unique<Bar>(42, 1337);
9090
auto* basePtr = static_cast<BarBase*>(f.get());
9191
auto f2 = clone(basePtr);
92-
static_assert(std::is_same<decltype(f2), std::unique_ptr<BarBase> >::value, "Must be the same");
92+
static_assert(std::is_same<decltype(f2), std::unique_ptr<BarBase>>::value, "Must be the same");
9393
BOOST_TEST((f && f2 && basePtr));
9494
BOOST_TEST(f->i == 42);
9595
BOOST_TEST(f->j == 1337);

0 commit comments

Comments
 (0)