[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [clazy] checks/level0: QStringRef also has (since Qt5.1) a trimmed() function. This can be used to a
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2016-12-04 15:44:30
Message-ID: E1cDYxq-0003cm-AM () code ! kde ! org
[Download RAW message or body]
Git commit 012dcb71a8b21d4877acb5b697a744eb230d3b75 by Christian Ehrlicher.
Committed on 04/12/2016 at 15:43.
Pushed by chehrlic into branch 'master'.
QStringRef also has (since Qt5.1) a trimmed() function. This can be used to avoid \
useless QString allocations within foo.mid(6).trimmed() -> \
foo.midRef(6).trimmed().toString()
REVIEW: 129602
M +1 -1 checks/level0/qstringref.cpp
https://commits.kde.org/clazy/012dcb71a8b21d4877acb5b697a744eb230d3b75
diff --git a/checks/level0/qstringref.cpp b/checks/level0/qstringref.cpp
index 65b1d8f..253f949 100644
--- a/checks/level0/qstringref.cpp
+++ b/checks/level0/qstringref.cpp
@@ -59,7 +59,7 @@ static bool isInterestingSecondMethod(CXXMethodDecl *method, const \
clang::LangOp
static const vector<string> list = { "compare", "contains", "count", \
"startsWith", "endsWith", "indexOf",
"isEmpty", "isNull", "lastIndexOf", \
"length", "size", "toDouble", "toFloat",
- "toInt", "toUInt", "toULong", \
"toULongLong", "toUShort", "toUcs4"}; + \
"toInt", "toUInt", "toULong", "toULongLong", "toUShort", "toUcs4", "trimmed" };
if (!clazy_std::contains(list, method->getNameAsString()))
return false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic