sashadereh
sashadereh

Reputation: 233

Uncrustify code formatter removes space in C++ one-liner

How to prevent Uncrustify code formatter from keeping one space in C++ one-liner between { and the rest code?

So, it changes this code

const Foo &GetBar() const { return bar; }

to this

const Foo &GetBar() const {return bar; }

I search for return in default uncrustify config, but found nothing in common with my problem.

Upvotes: 0

Views: 241

Answers (1)

EmDroid
EmDroid

Reputation: 6066

I think that this has more to do with brace spacing than with the return, so I'd check the space settings for braces. The first option I would try to play with would be sp_inside_braces (should be "ignore" by default).

Upvotes: 1

Related Questions