Coding Standard

RMAG Machine Coding Standards


Variables, method names, and function names will use camleCase naming convention. Private members will be named as m_lolMember. Header guards should be defined as <NAMESPACE>_<CLASS>_H. i.e ROFLCLASS_H. Hungarian notation should never be used.


Header includes should be in order of the header for the source file, then includes for libraries and frameworks, then includes from within the project.

Pointers (or lack therof)

There shall be no raw pointers in the code. All pointers will be handled via Boost's shared pointers.

Namespaces & Typedefs

No anonymous namespaces allowed, and no using directives. Typedefs should be used sparingly

Indentation and bracket alignment

Indentation will be done through tabs, not spaces. All if/for/while/do blocks should include brackets. Classes should be formatted as the following

class RoflClass
    omg lol();

    int laughs;

if(condition) // bad
if ( condition ) // bad
if (condition) // Good


Constructors should be used only to set variables required for the class's operation. Further initialization should be in a init() method.

Banned files

There are certain files that are strictly prohibited from being checked into the repository, primarily thumbs.dll on Windows and .DS_Store on Mac. These files serve absolutely no purpose and should be added to .gitignore immediately.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License