MantisBT - KWStyle
View Issue Details
0011046KWStylepublic2010-07-27 13:512010-07-27 13:51
Brad Davis 
Brad Davis 
normalminorhave not tried
assignedopen 
0011046: Allow consistent brace placement
Brace indentation checks differ for:
*class methods defined in class decl vs. outside class decl
*class decl inside function vs outside function
(others?...)

This is contrary to the ITK style rules and should be fixed (as an option?).

See additional information for specifics.
//
// new way; should pass
void Function()
{
  int i;
}

class C
{
public:
  void ClassMethod()
  { // new 2; old 4
    int i;
  } // new 2; old 4
};

void FunctionWithLocalClass()
{
  class LocalClass
  { // new 2; old 4
  public:
    void LocalClassMethod()
    { // new 4; old 6
      int i;
    } // new 4; old 6
  }; // new 2; old 4
}

//
// old way; should fail
void Function()
{
  int i;
}

class C
{
public:
  void ClassMethod()
    { // new 2; old 4
    int i;
    } // new 2; old 4
};

void FunctionWithLocalClass()
{
  class LocalClass
    { // new 2; old 4
  public:
      void LocalClassMethod()
      { // new 4; old 6
      int i;
      } // new 4; old 6
    }; // new 2; old 4
}
No tags attached.
Issue History
2010-07-27 13:51Brad DavisNew Issue
2010-07-27 13:51Brad DavisAssigned To => Brad Davis
2010-07-27 13:51Brad DavisStatusnew => assigned

There are no notes attached to this issue.