Switch(some case) {
case 1:
return something;
break;
case 2:
return something;
break;
case X:
return something;
break;
default:
return something;
break;
}
To my mind:
Assuming this switch statement is justified, the return and break just don't look right or aren't true.
The gap is clearly redundant, but the omission of a bad style (or is this bad style to start with?)?
I personally do not do this, but there are some of them in code-based work. And no, I'm not going to be self-confident and correct the code base.
theman_on_vista
source
share