From 13b139d0283a866dcf73bcca9405f5348a627954 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 21 Nov 2014 08:50:06 +0100 Subject: Fix MSVC warning about unused value in qstringalgorithms_p.h. qstringalgorithms_p.h(144) : warning C4189: 'newlen' : local variable is initialized but not referenced MSVC mistakenly reports the variable as unused since it is referenced only in a logical and-expression depending on the template-type deduced compile-time constant bool isConst. Change-Id: I84cfc681054f554a4243b6ce659dac16141f7564 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira Reviewed-by: Olivier Goffart --- src/corelib/tools/qstringalgorithms_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 c3a87b2072..2911055f6a 100644 --- a/src/corelib/tools/qstringalgorithms_p.h +++ b/src/corelib/tools/qstringalgorithms_p.h @@ -146,7 +146,7 @@ template struct QStringAlgorithms // nothing happened, return the original return str; } - result.resize(ptr - dst); + result.resize(newlen); return result; } }; -- cgit v1.2.3