Skip to content

Commit

Permalink
clang-format: Use InsertBraces
Browse files Browse the repository at this point in the history
  • Loading branch information
orestisfl committed May 23, 2024
1 parent cc9a84c commit 477b3bf
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 58 deletions.
11 changes: 6 additions & 5 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
BasedOnStyle: google
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortBlocksOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BasedOnStyle: google
ColumnLimit: 0
IndentWidth: 4
InsertBraces: true
PointerBindsToType: false
ColumnLimit: 0
SpaceBeforeParens: ControlStatements
SortIncludes: false
SpaceBeforeParens: ControlStatements
3 changes: 2 additions & 1 deletion dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ int logical_px(const int logical) {
* systems to 96 dpi in order to get the behavior they expect/are used to,
* but since we can easily detect this case in code, let’s do it for them.
*/
if ((dpi / 96.0) < 1.25)
if ((dpi / 96.0) < 1.25) {
return logical;
}
return ceil((dpi / 96.0) * logical);
}
Loading

0 comments on commit 477b3bf

Please sign in to comment.