Skip to content

Commit 74d4b48

Browse files
committed
compatibility update and some project cleaning
1 parent 9504665 commit 74d4b48

39 files changed

Lines changed: 5768 additions & 1367 deletions

.clang-format

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
BasedOnStyle: Google
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: false
5+
AlignArrayOfStructures: Left
6+
AlignConsecutiveAssignments: AcrossEmptyLinesAndComments
7+
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
8+
AlignConsecutiveDeclarations: None
9+
AlignConsecutiveMacros: Consecutive
10+
AlignConsecutiveShortCaseStatements:
11+
Enabled: true
12+
AcrossEmptyLines: true
13+
AcrossComments: true
14+
AlignCaseArrows: true
15+
AlignCaseColons: false
16+
AlignEscapedNewlines: LeftWithLastLine
17+
AlignOperands: Align
18+
AlignTrailingComments:
19+
Kind: Always
20+
OverEmptyLines: 0
21+
AlignPPAndNotPP: true
22+
AllowAllArgumentsOnNextLine: false
23+
AllowAllParametersOfDeclarationOnNextLine: false
24+
AllowBreakBeforeNoexceptSpecifier: Never
25+
AllowShortBlocksOnASingleLine: Always
26+
AllowShortCaseExpressionOnASingleLine: true
27+
AllowShortCaseLabelsOnASingleLine: true
28+
AllowShortCompoundRequirementOnASingleLine: true
29+
AllowShortEnumsOnASingleLine: true
30+
AllowShortFunctionsOnASingleLine: All
31+
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
32+
AllowShortLambdasOnASingleLine: All
33+
AllowShortLoopsOnASingleLine: true
34+
AllowShortNamespacesOnASingleLine: true
35+
AlwaysBreakBeforeMultilineStrings: false
36+
BinPackArguments: true
37+
BinPackLongBracedList: true
38+
BinPackParameters: BinPack
39+
BitFieldColonSpacing: Both
40+
BraceWrapping:
41+
AfterCaseLabel: false
42+
AfterClass: false
43+
AfterControlStatement: Never
44+
AfterEnum: false
45+
AfterFunction: false
46+
AfterNamespace: false
47+
AfterObjCDeclaration: false
48+
AfterStruct: false
49+
AfterUnion: false
50+
AfterExternBlock: false
51+
BeforeCatch: true
52+
BeforeElse: true
53+
BeforeLambdaBody: false
54+
BeforeWhile: false
55+
IndentBraces: true
56+
SplitEmptyFunction: false
57+
SplitEmptyRecord: false
58+
SplitEmptyNamespace: false
59+
BracedInitializerIndentWidth: 4
60+
BreakAdjacentStringLiterals: false
61+
BreakAfterAttributes: Never
62+
BreakAfterOpenBracketBracedList: false
63+
BreakAfterOpenBracketFunction: false
64+
BreakAfterOpenBracketIf: false
65+
BreakAfterOpenBracketLoop: false
66+
BreakAfterOpenBracketSwitch: false
67+
BreakAfterReturnType: Automatic
68+
BreakBeforeBinaryOperators: None
69+
BreakBeforeBraces: Custom
70+
BreakBeforeCloseBracketBracedList: true
71+
BreakBeforeCloseBracketFunction: true
72+
BreakBeforeCloseBracketIf: true
73+
BreakBeforeCloseBracketLoop: true
74+
BreakBeforeCloseBracketSwitch: true
75+
BreakBeforeConceptDeclarations: false
76+
BreakBeforeInlineASMColon: Never
77+
BreakBeforeTemplateCloser: true
78+
BreakBeforeTernaryOperators: false
79+
BreakBinaryOperations: Never
80+
BreakConstructorInitializers: BeforeColon
81+
BreakFunctionDefinitionParameters: false
82+
BreakInheritanceList: AfterComma
83+
BreakStringLiterals: true
84+
BreakTemplateDeclarations: Yes
85+
ColumnLimit: 130
86+
CompactNamespaces: false
87+
ConstructorInitializerIndentWidth: 4
88+
ContinuationIndentWidth: 2
89+
Cpp11BracedListStyle: Block
90+
EmptyLineAfterAccessModifier: Never
91+
EmptyLineBeforeAccessModifier: LogicalBlock
92+
EnumTrailingComma: Leave
93+
FixNamespaceComments: true
94+
IncludeBlocks: Preserve
95+
IndentAccessModifiers: false
96+
IndentCaseBlocks: false
97+
IndentCaseLabels: false
98+
IndentExportBlock: true
99+
IndentExternBlock: Indent
100+
IndentGotoLabels: false
101+
IndentPPDirectives: BeforeHash
102+
IndentRequiresClause: false
103+
IndentWidth: 4
104+
IndentWrappedFunctionNames: true
105+
InsertBraces: true
106+
InsertNewlineAtEOF: false
107+
InsertTrailingCommas: None
108+
IntegerLiteralSeparator:
109+
Binary: 4
110+
BinaryMinDigitsInsert: 8
111+
BinaryMaxDigitsRemove: 4
112+
Decimal: 3
113+
DecimalMinDigitsInsert: 6
114+
DecimalMaxDigitsRemove: 4
115+
Hex: 4
116+
HexMinDigitsInsert: 8
117+
HexMaxDigitsRemove: 4
118+
KeepEmptyLines:
119+
AtEndOfFile: false
120+
AtStartOfBlock: false
121+
AtStartOfFile: false
122+
LambdaBodyIndentation: Signature
123+
Language: Cpp
124+
LineEnding: DeriveCRLF
125+
MaxEmptyLinesToKeep: 2
126+
NamespaceIndentation: All
127+
NumericLiteralCase:
128+
ExponentLetter: Lower
129+
HexDigit: Upper
130+
Prefix: Lower
131+
Suffix: Lower
132+
PPIndentWidth: 4
133+
PackConstructorInitializers: BinPack
134+
PointerAlignment: Left
135+
QualifierAlignment: Custom
136+
QualifierOrder: [ friend, static, inline, constexpr, const, volatile, restrict, type ]
137+
ReferenceAlignment: Left
138+
ReflowComments: IndentOnly
139+
RemoveBracesLLVM: false
140+
RemoveEmptyLinesInUnwrappedLines: true
141+
RemoveParentheses: ReturnStatement
142+
RemoveSemicolon: true
143+
RequiresClausePosition: WithPreceding
144+
RequiresExpressionIndentation: OuterScope
145+
SeparateDefinitionBlocks: Always
146+
ShortNamespaceLines: 0
147+
SkipMacroDefinitionBody: false
148+
SortIncludes:
149+
Enabled: true
150+
IgnoreCase: true
151+
IgnoreExtension: true
152+
SortUsingDeclarations: LexicographicNumeric
153+
SpaceAfterCStyleCast: false
154+
SpaceAfterLogicalNot: false
155+
SpaceAfterOperatorKeyword: false
156+
SpaceAfterTemplateKeyword: false
157+
SpaceAroundPointerQualifiers: Default
158+
SpaceBeforeAssignmentOperators: true
159+
SpaceBeforeCaseColon: false
160+
SpaceBeforeCpp11BracedList: true
161+
SpaceBeforeCtorInitializerColon: true
162+
SpaceBeforeInheritanceColon: true
163+
SpaceBeforeJsonColon: false
164+
SpaceBeforeParens: Custom
165+
SpaceBeforeParensOptions:
166+
AfterControlStatements: true
167+
AfterForeachMacros: false
168+
AfterFunctionDeclarationName: false
169+
AfterFunctionDefinitionName: false
170+
AfterIfMacros: false
171+
AfterNot: true
172+
AfterOverloadedOperator: false
173+
AfterPlacementOperator: true
174+
AfterRequiresInClause: true
175+
AfterRequiresInExpression: true
176+
BeforeNonEmptyParentheses: false
177+
SpaceBeforeRangeBasedForLoopColon: true
178+
SpaceBeforeSquareBrackets: false
179+
SpaceInEmptyBraces: Never
180+
SpacesBeforeTrailingComments: 1
181+
SpacesInAngles: Never
182+
SpacesInContainerLiterals: false
183+
SpacesInLineCommentPrefix:
184+
Minimum: 1
185+
Maximum: -1
186+
SpacesInParens: Custom
187+
SpacesInParensOptions:
188+
ExceptDoubleParentheses: true
189+
InConditionalStatements: false
190+
InCStyleCasts: false
191+
InEmptyParentheses: false
192+
Other: false
193+
SpacesInSquareBrackets: false
194+
Standard: Auto
195+
TabWidth: 4
196+
UseTab: Always

.clang-tidy

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
Checks: >
3+
'-*,
4+
#bugprone-*,
5+
#cert-*,
6+
#cppcoreguidelines-*,
7+
#modernize-*,
8+
#google-default-arguments,
9+
#google-runtime-operator,
10+
#hicpp-exception-baseclass,
11+
#hicpp-multiway-paths-covered,
12+
#misc-misplaced-const,
13+
#misc-new-delete-overloads,
14+
#misc-non-copyable-objects,
15+
#misc-throw-by-value-catch-by-reference,
16+
#misc-unconventional-assign-operator,
17+
#misc-uniqueptr-reset-release,
18+
#mpi-buffer-deref,
19+
#mpi-type-mismatch,
20+
#openmp-use-default-none,
21+
#performance-*,
22+
#portability-simd-intrinsics,
23+
readability-*,
24+
-readability-uppercase-literal-suffix,
25+
-readability-braces-around-statements,
26+
-readability-named-parameter
27+
28+
CheckOptions:
29+
# --- Classes, unions, enums, types ---
30+
readability-identifier-naming.ClassCase: lower_case
31+
readability-identifier-naming.StructCase: lower_case
32+
readability-identifier-naming.UnionCase: lower_case
33+
readability-identifier-naming.EnumCase: CamelCase
34+
readability-identifier-naming.EnumPrefix: ''
35+
readability-identifier-naming.TypedefCase: lower_case
36+
readability-identifier-naming.ConceptCase: lower_case
37+
readability-identifier-naming.TemplateParameterCase: CamelCase
38+
readability-identifier-naming.NamespaceCase: lower_case
39+
40+
# --- Variables ---
41+
readability-identifier-naming.LocalVariableCase: camelBack
42+
readability-identifier-naming.GlobalVariableCase: lower_case
43+
readability-identifier-naming.ParameterCase: camelBack
44+
readability-identifier-naming.ConstantCase: camelBack
45+
readability-identifier-naming.VariableCase: camelBack
46+
47+
# --- Class and struct fields ---
48+
readability-identifier-naming.PublicMemberCase: camelBack
49+
readability-identifier-naming.PrivateMemberCase: camelBack
50+
readability-identifier-naming.ProtectedMemberCase: camelBack
51+
readability-identifier-naming.PrivateMemberPrefix: '_'
52+
readability-identifier-naming.PrivateMethodPrefix: '_'
53+
readability-identifier-naming.ProtectedMemberPrefix: '_'
54+
readability-identifier-naming.ProtectedMethodPrefix: '_'
55+
56+
# --- Functions and methods ---
57+
readability-identifier-naming.MethodCase: lower_case
58+
readability-identifier-naming.FunctionCase: lower_case
59+
60+
# --- Constants, macros, enumerators ---
61+
readability-identifier-naming.EnumConstantCase: CamelCase
62+
readability-identifier-naming.StaticConstantCase: lower_case
63+
readability-identifier-naming.StaticConstexprVariableCase: lower_case
64+
readability-identifier-naming.ConstexprVariableCase: lower_case
65+
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
66+
readability-identifier-naming.MacroDefinitionIgnoredRegexp: '^_?[A-Z][A-Z0-9_]*_?$'
67+
68+
# --- Min identifier length ---
69+
readability-identifier-length.MinimumLoopCounterNameLength: 1
70+
readability-identifier-length.MinimumVariableNameLength: 1
71+
readability-identifier-length.MinimumParameterNameLength: 1

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,6 @@ CTestTestfile.cmake
411411
_deps
412412
CMakeUserPresets.json
413413
out
414-
third_party
414+
third_party
415+
/.idea
416+
/build

0 commit comments

Comments
 (0)