Skip to content

Commit

Permalink
CODING_CONVENTIONS_C++.md: Change space after negation
Browse files Browse the repository at this point in the history
Adding a space after a unary operator is pretty uncommon and
inconsistent with what we do in C. Let's better keep the C++ and the C
code style consistent, unless we have a good reason to justify the
difference.
  • Loading branch information
maribu committed Oct 28, 2021
1 parent 5771889 commit 57fc4f5
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions CODING_CONVENTIONS_C++.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,6 @@ void my_class::do_something_else() {
- Keywords are always followed by a whitespace: `if (...)`, `template <...>`,
`while (...)`, etc.
- Leave a whitespace after `!` to make negations easily recognizable:
```cpp
if (! sunny())
stay_home();
else
go_outside();
```

- Opening braces belong to the same line:
```cpp
Expand Down

0 comments on commit 57fc4f5

Please sign in to comment.