Merge pull request #773 from Riksu9000/coding_style

Update coding style
This commit is contained in:
JF 2021-10-23 08:56:16 +02:00 committed by GitHub
commit 062007a8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,3 +94,10 @@ If there are no preconfigured rules for your IDE, you can use one of the existin
- **Includes** : - **Includes** :
- files from the project : `#include "relative/path/to/the/file.h"` - files from the project : `#include "relative/path/to/the/file.h"`
- external files and std : `#include <file.h>` - external files and std : `#include <file.h>`
- Only use [primary spellings for operators and tokens](https://en.cppreference.com/w/cpp/language/operator_alternative)
- Use auto sparingly. Don't use auto for [fundamental/built-in types](https://en.cppreference.com/w/cpp/language/types) and [fixed width integer types](https://en.cppreference.com/w/cpp/types/integer), except when initializing with a cast to avoid duplicating the type name.
- Examples:
- `auto* app = static_cast<DisplayApp*>(instance);`
- `auto number = static_cast<uint8_t>(variable);`
- `uint8_t returnValue = MyFunction();`
- Use nullptr instead of NULL