0

My source code

namespace one { namespace two {
->  static const class Example :
->  ->  Int1, Int2, Int3
->  {
->  public:
->  Example::~Example() :
->  ->  S1(),
->  ->  S2(),
->  ->  S3() {
->  ->  // if statements with empty braces
->  ->  if ( x )
->  ->  {
->  ->  }
->  ->  }
->  }
->  }
} } //namespace one::two

Is processed by Uncrustify to be ("+" = SPACE)

namespace one { namespace two {
->  +static const class Example :
->  ->  +Int1, Int2, Int3
->  +{
->  +public:
->  +Example::~Example() :
->  ->  +S1(),
->  ->  +S2(),
->  ->  +S3() {
->  ->  +// if statements with empty braces
->  ->  +if ( x )
->  ->  +{
->  ->  +}
->  ->  +}
->  +}
->  +}
} } //namespace one::two

It always adds a space ("+") after the TAB-indentation.

Where can I configure this?

Best, Ben

S.H
  • 875
  • 2
  • 11
  • 27

1 Answers1

0

I found the reason myself...

Uncrustify doesn't handle the

namespace one { namespace two {

correctly if both are defined on the same line. When I'm changing that to

namespace one { 
namespace two {

then it works fine and no space is inserted!

S.H
  • 875
  • 2
  • 11
  • 27