Disambiguate the second logical test.

The second line test could be misread by both the compiler or the reader.
gcc even warns about this, so add brackets just to make sure.
This commit is contained in:
Bill King
2010-06-25 14:12:01 +10:00
parent 6f67360efe
commit 21843d6326

View File

@@ -362,7 +362,7 @@ void CppHighlighter::highlightWord(QStringRef word, int position, int length)
if (word.length() > 2 && word.at(0) == QLatin1Char('Q')) {
if (word.at(1) == QLatin1Char('_') // Q_
|| word.at(1) == QLatin1Char('T') && word.at(2) == QLatin1Char('_')) { // QT_
|| (word.at(1) == QLatin1Char('T') && word.at(2) == QLatin1Char('_'))) { // QT_
for (int i = 1; i < word.length(); ++i) {
const QChar &ch = word.at(i);
if (! (ch.isUpper() || ch == QLatin1Char('_')))