aboutsummaryrefslogtreecommitdiff
path: root/contributing.md
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-09 14:23:35 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-09 14:23:35 +0200
commit08d0b07c19edfe8c81dfe4e21c0d4c1ef128b628 (patch)
tree8cb0237d598acfd4f8af1e7027d8338c8f8a1d63 /contributing.md
parent6b7a670d60fec808e4fd1fcf3a8df2c503dcbdf4 (diff)
update contributing.md
Diffstat (limited to 'contributing.md')
-rw-r--r--contributing.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/contributing.md b/contributing.md
index 2ff411a..9f87ec5 100644
--- a/contributing.md
+++ b/contributing.md
@@ -30,6 +30,27 @@
as these are no longer accessible when the engine is installed
- Getter and setter functions are appropriately prefixed with `get_` and
`set_`.
+- Doxygen commands are used with a backslash instead of an at-sign (i.e.
+ `\brief` instead of `@brief`)
+- A singleton's instance is always accessed using a getter function that
+ instantiates its own class as a static variable within the getter function
+ scope, instead of storing the instance as a member variable directly:
+
+ ```cpp
+ class Bad {
+ static Bad instance;
+ Bad & get_instance() { return instance; }
+ };
+
+ class Good {
+ Good & get_instance() {
+ static Good instance;
+ return instance;
+ }
+ };
+ ```
+- Member variable default values should be directly defined in the class
+ declaration instead of using the constructor.
## CMakeLists specific