diff --git a/.clang-format b/.clang-format index 12a233a0..dc328a5e 100644 --- a/.clang-format +++ b/.clang-format @@ -7,9 +7,9 @@ AccessModifierOffset: -2 # 开括号(开圆括号、开尖括号、开方括号)后的对齐: Align, DontAlign, AlwaysBreak(总是在开括号后换行) AlignAfterOpenBracket: Align # 连续赋值时,对齐所有等号 -AlignConsecutiveAssignments: true +AlignConsecutiveAssignments: false # 连续声明时,对齐所有声明的变量名 -AlignConsecutiveDeclarations: true +AlignConsecutiveDeclarations: false AlignEscapedNewlines: Right @@ -29,9 +29,9 @@ AllowShortCaseLabelsOnASingleLine: true # 允许短的函数放在同一行: None, InlineOnly(定义在类中), Empty(空函数), Inline(定义在类中,空函数), All AllowShortFunctionsOnASingleLine: Empty # 允许短的if语句保持在同一行 -AllowShortIfStatementsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: true # 允许短的循环保持在同一行 -AllowShortLoopsOnASingleLine: false +AllowShortLoopsOnASingleLine: true # 总是在定义返回类型后换行(deprecated) AlwaysBreakAfterDefinitionReturnType: None