diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-02-28 09:22:41 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-02-28 09:57:03 +0000 |
commit | 2ae8292d03beab5869a1319e3d18ea281a5d014c (patch) | |
tree | e6c3522204bbf2a2a6d01dd7751c685df3480e38 /src/corelib | |
parent | 17d780ad457fb9cbfc92bf6114bfcf4cc4ac5a7f (diff) |
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>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qlist.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<T>::removeAll(const T &_t) *n++ = *i; } - int removedCount = e - n; + int removedCount = int(e - n); d->end -= removedCount; return removedCount; } |