diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-21 08:50:06 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-26 06:32:20 +0100 |
commit | 13b139d0283a866dcf73bcca9405f5348a627954 (patch) | |
tree | 97dc2a7ddfbae4092bbe65da9ae49b51e42e1d88 /src/corelib/tools/qstringalgorithms_p.h | |
parent | 9a565f8fe47f09b3275d7cb425b62117e26be4e9 (diff) |
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 <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qstringalgorithms_p.h')
-rw-r--r-- | src/corelib/tools/qstringalgorithms_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 <typename StringType> struct QStringAlgorithms // nothing happened, return the original return str; } - result.resize(ptr - dst); + result.resize(newlen); return result; } }; |