diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-04-04 21:16:56 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-04-20 11:11:01 +0000 |
commit | af385fc34a98023ba2ab854f8890c6983ae57a3a (patch) | |
tree | cf84fa82b40d1be513699e7a9fb76c1b5a981d66 /src/lib | |
parent | 38ba93338244bde2d77f039953b64f767723e361 (diff) |
clang-tidy: Fix 'readability-*' warnings
Treat those as errors except for the 'readability-container-size-empty'
Change-Id: I6a8bb9d68fb5bc89697cc42179337d338a51035e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/corelib/parser/qmljslexer.cpp | 8 | ||||
-rw-r--r-- | src/lib/corelib/tools/shellutils.cpp | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/corelib/parser/qmljslexer.cpp b/src/lib/corelib/parser/qmljslexer.cpp index 815f1ef0d..f8e83c338 100644 --- a/src/lib/corelib/parser/qmljslexer.cpp +++ b/src/lib/corelib/parser/qmljslexer.cpp @@ -237,10 +237,10 @@ int Lexer::lex() bool Lexer::isUnicodeEscapeSequence(const QChar *chars) { - if (isHexDigit(chars[0]) && isHexDigit(chars[1]) && isHexDigit(chars[2]) && isHexDigit(chars[3])) - return true; - - return false; + return isHexDigit(chars[0]) + && isHexDigit(chars[1]) + && isHexDigit(chars[2]) + && isHexDigit(chars[3]); } QChar Lexer::decodeUnicodeEscapeCharacter(bool *ok) diff --git a/src/lib/corelib/tools/shellutils.cpp b/src/lib/corelib/tools/shellutils.cpp index dae98f337..b60881012 100644 --- a/src/lib/corelib/tools/shellutils.cpp +++ b/src/lib/corelib/tools/shellutils.cpp @@ -66,9 +66,7 @@ QString shellInterpreter(const QString &filePath) { inline static bool isSpecialChar(ushort c, const uchar (&iqm)[16]) { - if ((c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)))) - return true; - return false; + return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7))); } inline static bool hasSpecialChars(const QString &arg, const uchar (&iqm)[16]) |