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:
parent
b08b9183bc
commit
a566dbdaf7
10
CodingStyle
10
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user