Skip to content

Commit

Permalink
Improved .clang_format file.
Browse files Browse the repository at this point in the history
  • Loading branch information
a3d4 committed Mar 22, 2020
1 parent d55bbd4 commit a7d6128
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,35 @@
# Note that clang-format cannot express the style that closing parentheses
# behave similar to closing curly braces in a multi-line setting in that
# they have to be on a line of their own at the same indentation level
# as the opening part.
# as the opening part (aka "dangling parenthesis", see https://reviews.llvm.org/D33029).

Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignEscapedNewlinesLeft: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Allman
ColumnLimit: 120
ContinuationIndentWidth: 4
FixNamespaceComments: false
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
PenaltyBreakBeforeFirstCallParameter: 2000
PointerAlignment: Left
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
TabWidth: 4
UseTab: ForIndentation
UseTab: Always

# Local Variables:
# mode: yaml
Expand Down
2 changes: 1 addition & 1 deletion CODING_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct MeanSigma
double const d = 0;
int i = 0;
int j = 0;
char* s;
char* s = nullptr;
MeanAndSigma ms meanAndSigma(std::vector<float> const& _v, Accuracy _a);
Derived* x = dynamic_cast<Derived*>(base);
for (auto i = x->begin(); i != x->end(); ++i) {}
Expand Down

0 comments on commit a7d6128

Please sign in to comment.