Whats wrong with this switch statement?

^

What he said about the return statement.
You have a function that returns a boolean and it should return a boolean on all code paths.

The unreachable code is likely to do with the break statements.
If you're returning from each of the defined cases then the break statements after each return are never actually reached.

Ah of course, thanks. :)
 
Back
Top Bottom