#284 Ctor initializer with braces breaks indentation

closed-fixed
None
2015-01-03
2014-05-28
wibek
No

When a class field is initialized in the constructor initialization list with braces {} in stead of parens (), the next initialization line is not indented.

Consider this code fragment:

MyClass::MyClass()
    : x{0}
, y{0}
{}

The line , y{0} is not indented. If the line : x{0} was used with parens: : x(0) instead of braces, the last line would be properly indented:

MyClass::MyClass()
    : x(0)
    , y{0}  
{}

Astyle version 2.04. Used in Qt-creator 3.1.0

Discussion

  • Jim Pattee

    Jim Pattee - 2014-10-15

    Fixed.

     
  • Jim Pattee

    Jim Pattee - 2014-10-15
    • status: open --> open-fixed
    • assigned_to: Jim Pattee
    • Priority: 5 --> 7
     
  • Jim Pattee

    Jim Pattee - 2014-11-20
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.