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