diff --git a/.clang-format b/.clang-format index 2f9e67f..3118ae1 100644 --- a/.clang-format +++ b/.clang-format @@ -48,7 +48,7 @@ AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: Empty # 允许短的if语句保持在同一行 -AllowShortIfStatementsOnASingleLine: AllIfsAndElse +AllowShortIfStatementsOnASingleLine: Never # 允许短的循环保持在同一行 AllowShortLoopsOnASingleLine: true @@ -199,4 +199,6 @@ Standard: Latest TabWidth: 4 # 使用tab字符: Never, ForIndentation, ForContinuationAndIndentation, Always -UseTab: Never \ No newline at end of file +UseTab: Never + +InsertBraces: true \ No newline at end of file