Update Home
parent
6dc2129545
commit
38975ba88a
1 changed files with 16 additions and 1 deletions
17
Home.md
17
Home.md
|
@ -34,4 +34,19 @@ Its formatted as a list of rules to make it somewhat easier to read and understa
|
|||
#### Formatting
|
||||
- Indentation uses tabs
|
||||
- Preprocessor instructions have no indentation infront of them
|
||||
- Curly brackets go onto a new line
|
||||
- New Scopes should preferably go onto a newline
|
||||
*Inline functions are one of the few cases where that doesnt need to be the case*
|
||||
- Comments that are under 3 lines long can use single line syntax, otherwise multi line comments are appreciated
|
||||
- Avoid putting meaningful content in the opening and closing line of a multi line comment
|
||||
- If a functions has alot of parameters its allowed to seperate them into multiple lines
|
||||
*This depends on line size and as such occurs more frequently for definitions rather than calls.
|
||||
If there are parameters that are short, or logically grouped they can go onto the same line as each other*
|
||||
- Inside of a class the members should be at the top, followed by the constructors and then any functions
|
||||
- Functions inside of a class should be ordered so that they are close to related functions
|
||||
|
||||
<hr>
|
||||
|
||||
#### Code Style
|
||||
- Avoid large if trees, instead return early
|
||||
- Always include a default statement for switches over enums
|
||||
*If other code extends that enum, a switch statement would then error*
|
Loading…
Add table
Reference in a new issue