summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHou Lei <houlei@uniontech.com>2021-02-18 16:02:37 +0800
committerHou Lei <houlei@uniontech.com>2021-03-02 03:04:44 +0000
commit2b83e78f6ebff9a00388bc2c8b068e8123fa5c65 (patch)
treeb57471f711d16a205ae3bb46d2887848b1cee332
parent101581484bd278ce4a5f329ffb13c9e0b0e4c131 (diff)
Canonical type conversion
Avoid C-style casts when possible. Change-Id: I623d7bc62bd0e48a5e0493c892d6ad9b11b0ca0c Reviewed-by: David Faure <david.faure@kdab.com>
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index 691d578f13..2bbe6c3ad7 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -321,7 +321,7 @@ static inline bool isTextFile(const QByteArray &data)
const char *p = data.constData();
const char *e = p + qMin(128, data.size());
for ( ; p < e; ++p) {
- if ((unsigned char)(*p) < 32 && *p != 9 && *p !=10 && *p != 13)
+ if (static_cast<unsigned char>(*p) < 32 && *p != 9 && *p !=10 && *p != 13)
return false;
}