qlogging: avoid C-style casts
Amends e38a48200b.
Pick-to: 6.2 6.4
Change-Id: I053cb676398ae3ebc2ba68f0bf7359a0870303bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
parent
61a4880cb3
commit
6707b881cf
|
|
@ -939,7 +939,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
|
||||
|
|
@ -962,19 +962,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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue