summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Kauffmann <johanneskauffmann@hotmail.com>2022-10-25 21:46:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-10-28 04:32:40 +0000
commit85e0298e9c42d222c8e129ba5ce810fc14021c1f (patch)
tree86aade0c08f1482d811c4bf143421a88028d4de3
parent015bd7e193bb82a783df5e061ff839167957ce25 (diff)
downloadqtbase-85e0298e9c42d222c8e129ba5ce810fc14021c1f.tar.gz
qlogging: avoid C-style casts
Amends e38a48200b7e0d20c0ab564bb59bd978d72677b7. Change-Id: I053cb676398ae3ebc2ba68f0bf7359a0870303bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 6707b881cfdc4ef3bd954f8d91e04c00f69b816e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/corelib/global/qlogging.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index d1fa4b8077..9ac70b3340 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -909,7 +909,7 @@ Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
info.truncate(++pos);
if (info.at(pos - 1) == ')') {
- if (info.indexOf(operator_call) == pos - (qsizetype)strlen(operator_call))
+ if (info.indexOf(operator_call) == pos - qsizetype(strlen(operator_call)))
break;
// this function returns a pointer to a function
@@ -932,19 +932,19 @@ Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
if (pos > -1) {
switch (info.at(pos)) {
case ')':
- if (info.indexOf(operator_call) == pos - (qsizetype)strlen(operator_call) + 1)
+ if (info.indexOf(operator_call) == pos - qsizetype(strlen(operator_call)) + 1)
pos -= 2;
break;
case '<':
- if (info.indexOf(operator_lessThan) == pos - (qsizetype)strlen(operator_lessThan) + 1)
+ if (info.indexOf(operator_lessThan) == pos - qsizetype(strlen(operator_lessThan)) + 1)
--pos;
break;
case '>':
- if (info.indexOf(operator_greaterThan) == pos - (qsizetype)strlen(operator_greaterThan) + 1)
+ if (info.indexOf(operator_greaterThan) == pos - qsizetype(strlen(operator_greaterThan)) + 1)
--pos;
break;
case '=': {
- qsizetype operatorLength = (qsizetype)strlen(operator_lessThanEqual);
+ auto operatorLength = qsizetype(strlen(operator_lessThanEqual));
if (info.indexOf(operator_lessThanEqual) == pos - operatorLength + 1)
pos -= 2;
else if (info.indexOf(operator_greaterThanEqual) == pos - operatorLength + 1)