summaryrefslogtreecommitdiff
path: root/doc/contribute.md
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-10-23 18:00:47 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-10-23 18:00:47 +0200
commitda97a94a0fc89a646f9a7ab9d1b9937164227d2f (patch)
treee2b0b23ab43ecbc22ee58966d66c8399a385e01b /doc/contribute.md
parent411c10ec317464a79c353dc5c18b805cf4bdf7d0 (diff)
parent9538eb97166410ebc362addfb76ec54895491cd7 (diff)
Merge remote-tracking branch 'upstream/develop' into pts-settings
Diffstat (limited to 'doc/contribute.md')
-rw-r--r--doc/contribute.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/contribute.md b/doc/contribute.md
index 21746433..595a5996 100644
--- a/doc/contribute.md
+++ b/doc/contribute.md
@@ -94,3 +94,10 @@ If there are no preconfigured rules for your IDE, you can use one of the existin
- **Includes** :
- files from the project : `#include "relative/path/to/the/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