CODING_CONVENTIONS_C++.md: Change space after negation
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.
This commit is contained in:
parent
577188925d
commit
57fc4f5f77
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user