Commit 98e7484d authored by Boudewijn Rempt's avatar Boudewijn Rempt

Update hacking file

parent 8b18187e
......@@ -43,7 +43,7 @@ Includes
Initializers
Avoid as much as possible initializers in the body of the constructor. Use
initializer lists instead. Write the initializers as followed:
initializer lists instead. Write the initializers as follows
Class(A a, B b)
: Subclass(a)
......@@ -51,6 +51,12 @@ Initializers
{
}
Note the location of the colon and comma.
It is also okay to use initializers like, and maybe even preferred where it works.
int m_something {0};
Scope prefixes
Use only m_ for class-level variables. No other scope prefixes; no g_, l_,
......@@ -58,7 +64,8 @@ Scope prefixes
Shared pointers
Use shared pointers wherever possible.
Use shared pointers wherever possible. Prefer Qt's shared pointer classes
to our home-grown shared ppointer classes.
Getter/setter
......@@ -80,7 +87,7 @@ Function naming
If you encounter functions in c_style_like_this, feel free to rename. Also:
verbNoun -- i.e., rotateLayer, not layer_rotate. The latter is a true c-ism,
introduced by a language that needs to prefix the 'class' name to every function
in order to have something that not quite OO.
in order to have something that's not quite OO.
Variable/Parameter names
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment