mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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
1 changed files with 9 additions and 1 deletions
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…
Reference in a new issue