This commit is contained in:
fluxgen 2002-12-03 12:46:32 +00:00
parent 64c280e6e2
commit b25fd24b49

View file

@ -1,6 +1,6 @@
Use hard tab for indentation. (size 4) Use 4 space indent
Spaces between "," Spaces between ","
ex: 1, 2, 3, 4 ex: 1, 2, a, 4
if/else-statements: if/else-statements:
An else clause is joined to any preceding close curly brace An else clause is joined to any preceding close curly brace
@ -73,10 +73,6 @@ switch (...) {
break; break;
} }
goto-statement:
DONT USE IT!
Include guards: Include guards:
For files with namespace: For files with namespace:
#ifndef NAMESPACE_FILENAME_HH #ifndef NAMESPACE_FILENAME_HH
@ -115,22 +111,16 @@ void functionWithAName(...) {
...; ...;
} }
Use Javadoc style for function description (see www.doxygen.org)
Function comments: Function comments:
// This do that and that /**
// Returns this on success else This do that and that
// this on failure. @return this on success else this on failure.
// TODO: if there is something to do. TODO: if there is something to do.
*/
void functionDoes(...) { void functionDoes(...) {
} }
Comments:
Use // on few line comments.
Use
/*
...
...
*/
when there are a lot to comment
Class: Class:
Order: public, protected and then private Order: public, protected and then private