Add info to the CodingStyle for C++ constructors

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Thiago Macieira 2014-01-22 08:25:14 -08:00 committed by Dirk Hohndel
parent b08b9183bc
commit a566dbdaf7

View file

@ -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);
}
}
}