diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-08-17 15:48:38 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-08-17 15:48:38 +0200 |
commit | 7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9 (patch) | |
tree | 59128a57d87d7826de450a71e060bd869e837a4a /CONTRIBUTING.md | |
parent | Updated docs to mention InfoDump for creating README.md, etc. (#3895) (diff) | |
download | cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.gz cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.bz2 cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.lz cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.xz cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.zst cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.zip |
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4cd96afdd..ad10f1e69 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,12 @@ Here are the conventions: - `ThisIsAProperFunction()` `This_is_bad()` `this_is_bad()` `GoodVariableName` `badVariableName`. * All member variables start with `m_`, all function parameters start with `a_`, all class names start with `c`. - `class cMonster { int m_Health; int DecreaseHealth(int a_Amount); }` + * Function parameters that are coordinates should be passed using an appropriate storage container, and not as three separate arguments. + - e.g. for a block position, Vector3i. For an entity position, Vector3d. For a chunk coordinate, cChunkCoords. + - For a 3-dimensional box of blocks, use cCuboid. For an axis-aligned bounding box, use cBoundingBox. + * Parameters smaller than 4 elements (e.g. Vector3, cChunkCoords) should be passed by value. All other parameters should be passed by const reference, where applicable. + - `Foo(Vector3d a_Param1, const cCuboid & a_Param2)` + - See the discussion in issue #3853 * Put spaces after commas. `Vector3d(1, 2, 3)` instead of `Vector3d(1,2,3)` * Put spaces before and after every operator. - `a = b + c;` |