Compiler does not understand that there is no need for a switch default because the enclosing switch statement has already guarded against that. Changed to ternary operator to make compiler warning go away.