Bug reports are appreciated. Following a few guidelines listed below will help speed up the process of getting them fixed.
- Search the issue tracker to see if it has already been reported.
- Include additional information such as:
- A detailed explanation
- OpenGD Debug-Info
- Operating System version
- Screen shots (if applicable)
- ...and any other relevant information
-
void MyClass::method1() { if (aCondition) { // Do something } }
-
void MyClass::method1() { if (aCondition) { // Do something } }
However, the method definition could be defined in a header file (.h), if there's one line code only. In this case, Java-like braces should be used.
-
class MyClass { public: void method1(); int method2() { return _x; // only one line code can be placed in .h as method definition }; private: int _x; }
-
if (a == 10 && b == 42)
-
if (a==10&&b==42)
-
for (int i = 0; i != 10; ++i)
-
for(int i=0;i<10;++i)
-
foo(); myObject.foo(24);
-
foo ();
-
if (true) while (true)
-
if(myCondition)
switch (test)
{
case 1:
{
// Do something
break;
}
default:
// Do something else
} // No semi-colon here
-
if (foo == I_CAN_PUSH_ON_THE_RED_BUTTON) startTheNuclearWar();
-
while (lifeTheUniverseAndEverything != 42) lifeTheUniverseAndEverything = buildMorePowerfulComputerForTheAnswer();
-
MyClass instance{10.4};
-
MyClass instance(10.4);
-
if (!string.empty()) ...
-
if (string != "") ...
-
char aChar = static_cast<char>(_pEditView->execute(SCI_GETCHARAT, j));
-
char aChar = (char)_pEditView->execute(SCI_GETCHARAT, j);
-
if (!::PathFileExists(dir2Search))
-
if (not ::PathFileExists(dir2Search))
-
class IAmAClass {};
-
class iAmAClass {}; class I_am_a_class {};
void myMethod(uint myVeryLongParameter);
Any member variable name of class/struct should be preceded by an underscore.
public:
int _publicAttribute;
private:
int _pPrivateAttribute;
float _pAccount;
-
if (hours < 24 && minutes < 60 && seconds < 60)
-
if (a < 24 && b < 60 && c < 60)
-
// Two lines comment // Use still C++ comment line style
-
/* Please don't piss me off with that */
class Foo
{
int value = 0;
};
++i
i++
(It does not change anything for built-in types but it would bring consistency)