Skip to content

Commit 6dd5b22

Browse files
authored
Add Constants and Error Handling
1 parent 08c31d7 commit 6dd5b22

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/CODECONVENTIONS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Comments:
3333
* Be concise and only write comments for things that are not obvious.
3434
* Use // prefix, NOT /* ... */. No extra fluff.
3535

36+
Constants:
37+
* Design for type-safety when possible
38+
* Use ```enum``` and ```const``` where appropriate
39+
* Resort to ```#define MACROS``` only when no better option exists or it's a *good* use (get to know the [GNU PreProcessor Common Pitfalls](https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html))
40+
41+
Error Handling:
42+
* When possible please use a unified status return from functions, and use pointers to pass arguments in *and* out
3643

3744
Examples
3845
========

0 commit comments

Comments
 (0)