summaryrefslogtreecommitdiffstats
path: root/CodingStyle
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2014-01-22 08:25:14 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-22 08:28:43 -0800
commita566dbdaf76f6e1e7df35d75dc21b39b7968a9da (patch)
tree84f456091df394ee072adeb14365bf098df04bfb /CodingStyle
parentb08b9183bc89605ff416dc31e66e51d6b81ac56d (diff)
downloadsubsurface-a566dbdaf76f6e1e7df35d75dc21b39b7968a9da.tar.gz
Add info to the CodingStyle for C++ constructors
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CodingStyle')
-rw-r--r--CodingStyle10
1 files changed, 9 insertions, 1 deletions
diff --git a/CodingStyle b/CodingStyle
index 82c86e59f..95fb610f0 100644
--- a/CodingStyle
+++ b/CodingStyle
@@ -50,6 +50,14 @@
b = a + (c + d +
f + z);
+- in a C++ constructor initialization list, the colon is on the same line and
+ continuation lines are aligned as the rule above:
+
+ ClassName::ClassName() : x(1), y(2),
+ z(3)
+ {
+ }
+
- unfortunate inconsistency:
-- C code usually uses underscores to structure names
@@ -74,4 +82,4 @@
for (i = 0; i < 5; i++)
do_something(i);
}
- } \ No newline at end of file
+ }