[PATCH] Add info to the CodingStyle for C++ constructors
Dirk Hohndel
dirk at hohndel.org
Wed Jan 22 08:05:29 UTC 2014
On Tue, 2014-01-21 at 22:15 -0800, Thiago Macieira wrote:
> Signed-off-by: Thiago Macieira <thiago at macieira.org>
> ---
> CodingStyle | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/CodingStyle b/CodingStyle
> index 82c86e5..52f00fa 100644
> --- a/CodingStyle
> +++ b/CodingStyle
> @@ -50,6 +50,16 @@
> b = a + (c + d +
> f + z);
>
> +- in a C++ constructor initialization list, the colon is indented by
> + one Tab and continuation lines are aligned with two more spaces. The
> + comma is at the end, as listed above:
> +
> + ClassName::ClassName()
> + : x(1), y(2),
> + z(3)
Actually, this is NOT our suggested style:
ClassName::className() : x(1), y(2),
z(3)
{
I don't think we have a single instance with a leading colon (actually,
git grep found a couple of incorrect ternary expressions that I now am
going to fix)
/D
More information about the subsurface
mailing list