Skip to content
Snippets Groups Projects
Commit 33154a35 authored by Adrian Böckenkamp's avatar Adrian Böckenkamp
Browse files

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
parent 715a3935
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ For Python code, try to stick to <http://www.python.org/dev/peps/pep-0008>. ...@@ -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: ...@@ -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: ...@@ -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 (...) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment