diff options
author | Reinhold Gschweicher <pyro4hell@gmail.com> | 2021-11-06 00:02:17 +0100 |
---|---|---|
committer | Reinhold Gschweicher <pyro4hell@gmail.com> | 2021-11-15 22:02:49 +0100 |
commit | 3a41bff9eaf9cbae6d3864664ad08859ec2d2c44 (patch) | |
tree | 7ffcefcebf0f007686b62f26c9a3fb274e4b1b7c /doc | |
parent | 241d36471daaea03215c289f3dc2bdc2860b5053 (diff) |
docs: add non-relative includes to coding standard
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contribute.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/contribute.md b/doc/contribute.md index 595a5996..f7b8ea3e 100644 --- a/doc/contribute.md +++ b/doc/contribute.md @@ -94,6 +94,7 @@ 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>` + - use includes relative to included directories like `src`, not relative to the current file. Don't do: `#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: |