simplecpp: convert a few mutual exclusive ifs into else ifs.

This commit is contained in:
Matthias Krüger 2016-07-20 12:56:29 +02:00
parent 03d2829fb9
commit 30e3897247
1 changed files with 5 additions and 5 deletions

View File

@ -1068,15 +1068,15 @@ void simplifySizeof(simplecpp::TokenList &expr) {
for (simplecpp::Token *typeToken = tok1; typeToken != tok2; typeToken = typeToken->next) {
if (typeToken->str == "char")
sz = sizeof(char);
if (typeToken->str == "short")
else if (typeToken->str == "short")
sz = sizeof(short);
if (typeToken->str == "int")
else if (typeToken->str == "int")
sz = sizeof(int);
if (typeToken->str == "long")
else if (typeToken->str == "long")
sz = sizeof(long);
if (typeToken->str == "float")
else if (typeToken->str == "float")
sz = sizeof(float);
if (typeToken->str == "double")
else if (typeToken->str == "double")
sz = sizeof(double);
}