Изменил(а) на 'C/C++ Coding Conventions'
@@ -1,6 +1,9 @@
|
||||
### Вот некоторые соглашения которые сейчас используются и должны использоваться дальше в нашем коде:
|
||||
|
||||
**1. We use include guards instead of #pragma once**
|
||||
|
||||
**2. 3rd-party headers must be included using <>, and our files - using ""**
|
||||
|
||||
**3. Author information, like "Created by John Doe on xx.xx.xxxx", which is inserted automatically by many IDEs when creating a new file, is not allowed and must be removed**
|
||||
|
||||
**4. General naming conventions examples:**
|
||||
@@ -24,7 +27,9 @@
|
||||
| Boolean getters | canFoo, hasFoo, isFoo, ... |
|
||||
|
||||
**5. For asynchronous functions use suffix "Async"**, e.g: `void loadAsync()`
|
||||
|
||||
**6. Avoid using `[&]` or `[=]` as lambda captions. It often causes problems with dangling references.**
|
||||
|
||||
**7. Put bodies of selection and iteration statements into compound blocks, even if the body is a one-liner** E.g.:
|
||||
```
|
||||
// Bad
|
||||
|
||||
Reference in New Issue
Block a user