Version 1.0 - By Jonathan Mercier-Ganady
Before contributing to the project please read the following page.
The Actionaz coding style is almost the same as the coding style of Qt.
Only comment when needed, usually naming the variables, classes and methods correctly should be sufficient for every developer to understand what the code does.
// Wrong // Returns: the value of X int getX();
class MyClass { private: int mMyValue; };
class MyClass { public: int myValue() const { return mMyValue; } void setMyValue (int myValue) { mMyValue = myValue; } private: int mMyValue; };
// Wrong int actionIndex; for(int i = 0; i < 5; ++i) { actionIndex = i * 2; // actionIndex is used here... } // Correct for(int i = 0; i < 5; ++i) { int actionIndex = i * 2; // actionIndex is used here... }
//Correct if(foo) { // do stuff here } //Wrong if (foo) { // do stuff here }
//Wrong if(foo) if(bar) doSomething(); //Correct if(foo) { if(bar) doSomething(); }
// Wrong float a = 4.2f; int b = (int)a; // Correct float a = 4.2f; int b = static_cast<int>(a);
Go back to the page : Contribute to Actionaz
Other languages for this page : (fr)