forked from qt-creator/qt-creator
Preferably use QStringRef::toInt().
Avoid allocations for converting to int. Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -243,7 +243,7 @@ static inline QString nextStash(const QString &stash)
|
||||
if (closingBracePos == -1)
|
||||
return QString();
|
||||
bool ok;
|
||||
const int n = stash.mid(openingBracePos + 1, closingBracePos - openingBracePos - 1).toInt(&ok);
|
||||
const int n = stash.midRef(openingBracePos + 1, closingBracePos - openingBracePos - 1).toInt(&ok);
|
||||
if (!ok)
|
||||
return QString();
|
||||
QString rc = stash.left(openingBracePos + 1);
|
||||
|
||||
Reference in New Issue
Block a user