summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2019-02-19 15:21:58 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-23 21:54:52 +0000
commita2b31cd5db6410144a613142a7b60f0cd2ba2b1d (patch)
tree27729ecfca3a8421b42876631e35462661d99f8b /src/corelib/tools/qstring.cpp
parent1136c9849e26423f72d7a0a7a92be8c93c13d7a6 (diff)
Fix build for size with gcc
Fixes the error: variable 'isDifferent' set but not used Change-Id: Ibd60b17126057da64a41d325b7ef548316f27c4b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r--src/corelib/tools/qstring.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 63d44eb39c..d8bfb69a8b 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1047,6 +1047,7 @@ static int ucstrncmp(const QChar *a, const uchar *c, size_t l)
__m128i nullmask = _mm_setzero_si128();
qptrdiff offset = 0;
+# if !defined(__OPTIMIZE_SIZE__)
// Using the PMOVMSKB instruction, we get two bits for each character
// we compare.
int retval;
@@ -1059,6 +1060,7 @@ static int ucstrncmp(const QChar *a, const uchar *c, size_t l)
retval = uc[offset + idx / 2] - c[offset + idx / 2];
return true;
};
+# endif
// we're going to read uc[offset..offset+15] (32 bytes)
// and c[offset..offset+15] (16 bytes)