X-Git-Url: https://git.octo.it/?p=supertux.git;a=blobdiff_plain;f=CODINGSTYLE;h=a7fd5eeeea1ab359a92b982dd7a99a4b34ddf601;hp=99dbb19734144ef8c8a382aaeaba88ffe3809bcc;hb=HEAD;hpb=414087b22139290ef5e97f0ad14e29f1f80c2b1e diff --git a/CODINGSTYLE b/CODINGSTYLE index 99dbb1973..a7fd5eeee 100644 --- a/CODINGSTYLE +++ b/CODINGSTYLE @@ -1,6 +1,11 @@ SuperTux Coding Standards ========================= +* start member variable name with "m_", global variables with "g_" and + static variables with "s_" + +* avoid spaces at the end of lines + * proper separation between generic engine code and game specific code should be done whenever feasible @@ -9,12 +14,12 @@ SuperTux Coding Standards * external libraries are not allowed in src/, they go to external/ -* do not use raw pointer and new/delete, use auto_ptr<> instead +* do not use raw pointer and new/delete, use std::unique_ptr<> instead * properly separate data members and member functions, don't mix them in the same public/private/protected section -* conditional includes should be indended: +* conditional includes should be indented: #ifdef FOOBAR # include "foobar.hpp" @@ -45,6 +50,8 @@ SuperTux Coding Standards do not use /**< and other styles of comments +* write regular comments with //, not with /* */ + * more info on good practices can be found at: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml