diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-11-06 09:52:05 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-11-06 09:52:05 +0100 |
commit | f4083c161a1176c900629ba61d96843645fc7be5 (patch) | |
tree | 0c136c9af142a4f7018a7441ec879b3b41da02c0 /contributing.md | |
parent | bf4c172f2709adf5a6f210bae60e16972e8decad (diff) | |
parent | 6ce2c14077e3e6dd01398d582b42dc50e9141f54 (diff) |
Merge remote-tracking branch 'origin/master' into max/scenes
Diffstat (limited to 'contributing.md')
-rw-r--r-- | contributing.md | 31 |
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 |