Use switch over strings where possible

Change cascades of ifs which can be converted to switch over Strings.
A switch statement might be faster than an if-then-else chain. And it
improves clarity.

The problem with if..else chain is that I have to look into all the
if conditions to understand what the program is doing. And the variable
might change in the chain processing.

Change-Id: I936f634408bce4b867ca8794debe1a12500e0de6
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
4 files changed