Tiny updates in Coding-Style guideline.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1317 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -8,7 +8,7 @@ For Python code, try to stick to <http://www.python.org/dev/peps/pep-0008>.
|
|||||||
Especially use 4 spaces per indentation level, and don't mix tabs and spaces
|
Especially use 4 spaces per indentation level, and don't mix tabs and spaces
|
||||||
for indentation.
|
for indentation.
|
||||||
|
|
||||||
The following style rules apply to C/C++ code:
|
The following style rules apply to C/C++/AspectC++ code:
|
||||||
|
|
||||||
- Language (comments, SVN commit messages, "temporary" stuff): English
|
- Language (comments, SVN commit messages, "temporary" stuff): English
|
||||||
(without exception)
|
(without exception)
|
||||||
@ -56,7 +56,7 @@ The following style rules apply to C/C++ code:
|
|||||||
class Foo {
|
class Foo {
|
||||||
public:
|
public:
|
||||||
<TAB>void doSomething();
|
<TAB>void doSomething();
|
||||||
}
|
};
|
||||||
Similarly (and for the same reason) for namespaces and switch/case
|
Similarly (and for the same reason) for namespaces and switch/case
|
||||||
statements:
|
statements:
|
||||||
switch (foo) {
|
switch (foo) {
|
||||||
@ -69,14 +69,14 @@ The following style rules apply to C/C++ code:
|
|||||||
if (something) {
|
if (something) {
|
||||||
<TAB>...
|
<TAB>...
|
||||||
}
|
}
|
||||||
* Function definitions are an exception to this ('{' in a new line):
|
* Method/Function definitions are an exception to this ('{' in a new line):
|
||||||
Definition: | Declaration:
|
Definition: | Declaration:
|
||||||
void myFunction(int i) | void myFunction(int i);
|
void myFunction(int i) | void myFunction(int i);
|
||||||
{ |
|
{ |
|
||||||
<TAB>... |
|
<TAB>... |
|
||||||
} |
|
} |
|
||||||
* Control structure tokens ("if", "try", ...) are followed by a single
|
* Control structure tokens ("if", "try", for, ...) are followed by a
|
||||||
space for better disambiguation from function definitions:
|
single space for better disambiguation from function definitions:
|
||||||
if (...) {
|
if (...) {
|
||||||
<TAB>...
|
<TAB>...
|
||||||
} else if (...) {
|
} else if (...) {
|
||||||
|
|||||||
Reference in New Issue
Block a user