Misha Koshelev wrote:
On a more stylistic note, any reason for all these single line if statements that have their contents enclosed in {}'s? (i.e., instead of:
if (a) { call_b(); }
why not just:
if (a) call_b();
If anything, this adds one unnecessary line with the single } after the statement itself, and seems unnecessary to me.
Misha
If either part of an if-else statement is compound, then fully-bracketed syntax (as it is known) is considered good style by some (for example, see the Indian Hill Style and Coding Standard): it may make problem detection easier.