aboutsummaryrefslogtreecommitdiff
path: root/contributing.md
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-06 09:52:05 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-06 09:52:05 +0100
commitf4083c161a1176c900629ba61d96843645fc7be5 (patch)
tree0c136c9af142a4f7018a7441ec879b3b41da02c0 /contributing.md
parentbf4c172f2709adf5a6f210bae60e16972e8decad (diff)
parent6ce2c14077e3e6dd01398d582b42dc50e9141f54 (diff)
Merge remote-tracking branch 'origin/master' into max/scenes
Diffstat (limited to 'contributing.md')
-rw-r--r--contributing.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/contributing.md b/contributing.md
index 2fe46f7..e910dba 100644
--- a/contributing.md
+++ b/contributing.md
@@ -386,6 +386,37 @@ that you can click on to open them.
#endif
```
</td></tr></table></details>
+- <details><summary>
+ Variables that are being moved always use the fully qualified <code>std::move</code>
+ </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td>
+
+ ```cpp
+ using namespace std;
+ string foo = "bar";
+ ref_fn(std::move(foo));
+ ```
+ </td><td>
+
+ ```cpp
+ using namespace std;
+ string foo = "bar";
+ ref_fn(move(foo));
+ ```
+ </td></tr></table></details>
+- <details><summary>
+ If possible, classes and structs are passed to functions by (const) reference
+ </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td>
+
+ ```cpp
+ void foo(const Point & p);
+ ```
+ </td><td>
+
+ ```cpp
+ void foo(Point & p);
+ void bar(Point p);
+ ```
+ </td></tr></table></details>
## CMakeLists-specific