Is it okay to combine cases
that share assignments and repeat the case
for assignments that are not shared, or is it preferred to just keep each se
If you run static analysis tool like Coverity it report minor error if you combine multiple switch cases like below.
case -90:
// Intentionally fall through
case 90:
w = 480;
x = '0';
break;
Better to repeat some lines of code than to make some undesired error.
case -90:
w = 480;
x = '0';
break;
case 90:
w = 480;
x = '0';
break;