Add and apply InsertBraces statement

> Insert braces after control statements (if, else, for, do, and while)
> in C++ unless the control statements are inside macro definitions or
> the braces would enclose preprocessor directives.

(cherry picked from commit d051e1e8f8)
This commit is contained in:
Ondřej Surý 2025-08-19 07:11:16 +02:00
parent 2270946186
commit a464171243
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41
3 changed files with 4 additions and 0 deletions

View file

@ -67,6 +67,7 @@ IncludeCategories:
- Regex: '.*'
Priority: 0
IndentExternBlock: NoIndent
InsertBraces: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 30

View file

@ -55,6 +55,7 @@ IncludeCategories:
- Regex: '".*"'
Priority: 9
IndentExternBlock: NoIndent
InsertBraces: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 30

View file

@ -739,7 +739,9 @@ Exit:
if (decoder->_total_overhead >= 100 * 1024 &&
decoder->_total_read - decoder->_total_overhead <
decoder->_total_read / 4)
{
ret = -1;
}
}
return ret;
}