From a070ca0d939356fa4b87deea0e5a395e40c76c3c Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Mon, 19 Aug 2024 07:29:11 +0200 Subject: Change Clang-Format settings to adhere to the used coding style (#2331) * Fix whitespaces for initializer lists ("type x {value};" vs "type x{ value };") * Change pointer alignment from right to left --- .clang-format | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.clang-format') diff --git a/.clang-format b/.clang-format index ee8a8a8c92..90124fb04b 100644 --- a/.clang-format +++ b/.clang-format @@ -40,7 +40,7 @@ CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true +Cpp11BracedListStyle: false DeriveLineEnding: true DerivePointerAlignment: false DisableFormat: false @@ -87,7 +87,7 @@ PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 1000 -PointerAlignment: Right +PointerAlignment: Left ReflowComments: true SortIncludes: false SortUsingDeclarations: true @@ -95,7 +95,7 @@ SpaceAfterCStyleCast: true SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true -SpaceBeforeCpp11BracedList: true +SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements -- cgit v1.2.3 From 4bda6873ee7baac1ac34f92178d871c430da88c6 Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Wed, 21 Aug 2024 18:46:49 +0200 Subject: More changes to Clang-Format to match the current coding standard (#2375) --- .clang-format | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '.clang-format') diff --git a/.clang-format b/.clang-format index 90124fb04b..f5a49845d0 100644 --- a/.clang-format +++ b/.clang-format @@ -2,7 +2,7 @@ # clang-format version 10.0.0+ Language: Cpp # BasedOnStyle: Microsoft -AccessModifierOffset: -2 +AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveMacros: true AlignConsecutiveAssignments: true @@ -15,14 +15,14 @@ AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Always AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All -AllowShortLambdasOnASingleLine: All +AllowShortFunctionsOnASingleLine: InlineOnly +AllowShortLambdasOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: MultiLine +AlwaysBreakTemplateDeclarations: Yes BinPackArguments: true BinPackParameters: true BreakBeforeBinaryOperators: None @@ -67,7 +67,7 @@ IndentCaseLabels: true IndentGotoLabels: true IndentPPDirectives: None IndentWidth: 4 -IndentWrappedFunctionNames: false +IndentWrappedFunctionNames: true JavaScriptQuotes: Leave JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: false @@ -91,9 +91,9 @@ PointerAlignment: Left ReflowComments: true SortIncludes: false SortUsingDeclarations: true -SpaceAfterCStyleCast: true +SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: true +SpaceAfterTemplateKeyword: false SpaceBeforeAssignmentOperators: true SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true @@ -102,8 +102,8 @@ SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyBlock: false SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 2 -SpacesInAngles: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: Never SpacesInContainerLiterals: false SpacesInCStyleCastParentheses: false SpacesInParentheses: false -- cgit v1.2.3