cppcheck: Expression is always false because 'else if' condition matches previous condition at line 158