SourceForge has been redesigned. Learn more.
Close

#247 Do not reformat class inline methods

closed-fixed
None
2015-01-03
2013-11-01
No

Simple inline's of C++ classes should follow the style:

class C {
  int x;
  int f() { return x; }
};

However, astyle applies a uniform formatting style to all functions, so that running astyle on the file produces output like the following:

class C {
  int x;
  int f()
  {
    return x;
  }
};

There should be a switch that would instruct astyle to leave inlined methods alone.

Discussion

  • Matthew Woehlke

    Matthew Woehlke - 2013-12-29

    Hmm... astyle leaves them alone for me. What options are you using?

     
  • Jim Pattee

    Jim Pattee - 2014-10-16

    Use keep-one-line-blocks.

     
  • Jim Pattee

    Jim Pattee - 2014-10-16
    • 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.