Browse Source

Clang-format: better match code policy example for constructors

AllowAllConstructorInitializersOnNextLine and
ConstructorInitializerAllOnOneLineOrOnePerLine are both deprecated.

PackConstructorInitializers=Never is the most similar setting to
most code and the example in the policy document. E.g. this does not
get reformatted:

    STRINGFORMATTER( int aReserve = 300 ) :
        buffer( aReserve, '\0' )
    {
    }
pull/18/head
John Beard 6 months ago
parent
commit
60d18176ef
  1. 3
      _clang-format

3
_clang-format

@ -6,7 +6,6 @@ AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignTrailingComments: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
@ -25,7 +24,6 @@ BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakStringLiterals: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
@ -39,6 +37,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner
PackConstructorInitializers: Never
PointerAlignment: Left
ReflowComments: false
SortIncludes: false

Loading…
Cancel
Save