From 2ae8292d03beab5869a1319e3d18ea281a5d014c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 28 Feb 2017 09:22:41 +0100 Subject: QList: Avoid implicit conversion warning This fixes compiling an application using QList and -Wshorten-64-to-32 on a 64-bit system without getting this warning: ... 5.8/clang_64/lib/QtCore.framework/Headers/qlist.h:897:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] int removedCount = e - n; ~~~~~~~~~~~~ ~~^~~ Change-Id: I688ed086805c431821c2ee6078fa5aeb631e7a07 Reviewed-by: Marc Mutz --- src/corelib/tools/qlist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qlist.h') diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index c0a92aaa10..5995be47a9 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -894,7 +894,7 @@ Q_OUTOFLINE_TEMPLATE int QList::removeAll(const T &_t) *n++ = *i; } - int removedCount = e - n; + int removedCount = int(e - n); d->end -= removedCount; return removedCount; } -- cgit v1.2.3