else if((types[i] & ~PT_CLOSEFIGURE) == PT_LINETO){
PATH_LineTo(dc, pts[i].x, pts[i].y);
}
if(!((i + 2 < cbPoints) && (types[i + 1] == PT_BEZIERTO)
&& ((types[i + 2] & ~PT_CLOSEFIGURE) == PT_BEZIERTO))){
goto err;
}
else{
goto err;
}
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
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.