Tod
Tod

Reputation: 8242

Can Eclipse CDT formatter be set to keep one liners when reformatting?

In my include files I'll often have some single line functions, such as:

void SetValue(int value) {m_value = value;}
int GetValue() const {return m_value;}

I like keeping these on one line but sometimes the code gets wonky and I hit the keystroke to auto reformat the file and my normal code style settings break this up into multiple lines, which I like for non-single line functions. I read in another post about a Java @formatter flag so I tried it, but alas, those Java folks get all the cool tricks. Does anyone know if there is an equivalent for the C++ editor, or another way to achieve the goal?

Upvotes: 2

Views: 619

Answers (1)

yapper
yapper

Reputation: 58

This appears to not be possible. See this related question (not specifically about CDT).

Upvotes: 3

Related Questions