Version 1 (modified by shane, 10 years ago) (diff)


This page documents some of the agreed-upon coding guidelines.

Tabs & Indentation

Do not use hard tabs. (Commits may be prevented by a Subversion pre-commit hook.)

Indentation at each level is 4 spaces.

Operator Overloading

When a class supports operator overloading, then there should also be non-overloaded methods, like this:

class Foo 
    bool equals(const Foo &other) const;
    bool operator==(const Foo &other) const { return equals(other); }        


Please don't start things with underscores.

Jinmei has been using CamelCase for class names, and lowercase_with_underscores for methods and variables.

Imported Code

If you import code from another project, don't bother to change the code to match our guidelines unless you plan on editing it relatively heavily.