diff options
author | ksooo <3226626+ksooo@users.noreply.github.com> | 2023-10-25 08:24:16 +0200 |
---|---|---|
committer | ksooo <3226626+ksooo@users.noreply.github.com> | 2023-10-25 08:24:16 +0200 |
commit | 8a8f809a4c78f52a00bd2f990c2997d2b43f04ff (patch) | |
tree | 0f1c9cc4f05c195493241e38a9ede61b3b6c4481 /docs | |
parent | 662910846287558a90649776f61bb2ba44cafa85 (diff) |
[docs] Changed sample code to use prefix operator in for loops intstead of postfix operator.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/CODE_GUIDELINES.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/CODE_GUIDELINES.md b/docs/CODE_GUIDELINES.md index c7cf298042..a307ad5412 100644 --- a/docs/CODE_GUIDELINES.md +++ b/docs/CODE_GUIDELINES.md @@ -88,7 +88,7 @@ The `ColumnLimit` in `.clang-format` is set to `100` which defines line length ( Curly braces always go on a new line. ```cpp -for (int i = 0; i < t; i++) +for (int i = 0; i < t; ++i) { [...] } @@ -201,7 +201,7 @@ a = (b + c) * d; Control statement keywords have to be separated from opening parentheses by one space. ```cpp while (true); -for (int i = 0; i < x; i++); +for (int i = 0; i < x; ++i); ``` When conditions are used without parentheses, it is preferable to add a new line, to make the next block of code more readable. ```cpp |