From 8948042bd049d08e7653f78b60951408603edb8c Mon Sep 17 00:00:00 2001 From: Julien Blanc Date: Thu, 13 Aug 2015 09:03:39 +0200 Subject: 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 --- src/corelib/tools/qstringalgorithms_p.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/corelib/tools/qstringalgorithms_p.h') 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 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); -- cgit v1.2.3