From 38975ba88aa91a220b60ae95e9f9e09e94a42bf1 Mon Sep 17 00:00:00 2001 From: Booklordofthedings Date: Mon, 10 Mar 2025 12:03:35 +0100 Subject: [PATCH] Update Home --- Home.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 207f5b9..248474d 100644 --- a/Home.md +++ b/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 \ No newline at end of file +- 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 + +
+ +#### 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* \ No newline at end of file