From f7338d86af68b7979d30f444d68e9a67009a2587 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 14 Sep 2015 13:56:13 +0200 Subject: [PATCH] tools: StringBuilder - silence clang warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] a.resize(it - a.constData()); ~ ~~~^~~~~~~~~~~~~~~ Change-Id: I8c199d69f2e0d41d1c288d452b9d621b201fa98e Reviewed-by: Jan Arve Sæther Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/tools/qstringbuilder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index 1dbc005bca..3d41aeee18 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -421,7 +421,7 @@ QString &operator+=(QString &a, const QStringBuilder &b) a.reserve(len); QChar *it = a.data() + a.size(); QConcatenable< QStringBuilder >::appendTo(b, it); - a.resize(it - a.constData()); //may be smaller than len if there was conversion from utf8 + a.resize(int(it - a.constData())); //may be smaller than len if there was conversion from utf8 return a; }