summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Blanc <julien.blanc@nmc-company.fr>2015-08-13 09:03:39 +0200
committerThiago Macieira <thiago.macieira@intel.com>2015-08-26 05:28:16 +0000
commit8948042bd049d08e7653f78b60951408603edb8c (patch)
tree7f06822d4410a605c4c1b6fa234f00a4bef9a11a
parent53ecaade10319ecc1d8115521ae6d8eba1ee55c1 (diff)
QString perf improvement : removal of useless test
Removed a test in QStringAlgorithms trimmed_helper. That test is not needed because both null / empty QStrings are already handled by the previous test, other cases are handled just fine by the general case. Change-Id: I26db1142a656a7d06dfdd6b3b8f8a3ee6ca22302 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/tools/qstringalgorithms_p.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/tools/qstringalgorithms_p.h b/src/corelib/tools/qstringalgorithms_p.h
index 65901b0286..a12874f567 100644
--- a/src/corelib/tools/qstringalgorithms_p.h
+++ b/src/corelib/tools/qstringalgorithms_p.h
@@ -101,8 +101,6 @@ template <typename StringType> struct QStringAlgorithms
if (begin == str.cbegin() && end == str.cend())
return str;
- if (begin == end)
- return StringType();
if (!isConst && str.isDetached())
return trimmed_helper_inplace(str, begin, end);
return StringType(begin, end - begin);