From 537af273026eaf0a18d2151ad6928b7797d7955b Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 10 Jan 2018 14:43:49 +0100 Subject: [PATCH] Simplify ifs since PP_WHITESPACE and WHITESPACE are the same Change-Id: Ib18c60270d9275840db051f1eec86227cc8f6c1c Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/tools/moc/preprocessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index a6725af924..e83125925d 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -1131,14 +1131,14 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed) Token lastToken = HASH; // skip shitespace at the beginning for (int i = start; i < index - 1; ++i) { Token token = symbols.at(i).token; - if (token == PP_WHITESPACE || token == WHITESPACE) { + if (token == WHITESPACE) { if (lastToken == PP_HASH || lastToken == HASH || lastToken == PP_HASHHASH || - lastToken == PP_WHITESPACE || lastToken == WHITESPACE) + lastToken == WHITESPACE) continue; } else if (token == PP_HASHHASH) { if (!macro.symbols.isEmpty() && - (lastToken == PP_WHITESPACE || lastToken == WHITESPACE)) + lastToken == WHITESPACE) macro.symbols.pop_back(); } macro.symbols.append(symbols.at(i));