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 <marc.mutz@kdab.com>
This commit is contained in:
Stig Bjørlykke 2017-02-28 09:22:41 +01:00
parent 17d780ad45
commit 2ae8292d03

View File

@ -894,7 +894,7 @@ Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t)
*n++ = *i;
}
int removedCount = e - n;
int removedCount = int(e - n);
d->end -= removedCount;
return removedCount;
}