This fixes compiling an application using QVector and -Wshorten-64-to-32
on a 64-bit system without getting this warning:
... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:695:18:
warning: implicit conversion loses integer precision: 'typename
iterator_traits<QString *>::difference_type' (aka 'long') to 'int'
[-Wshorten-64-to-32]
int offset = std::distance(d->begin(), before);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:731:35:
warning: implicit conversion loses integer precision: 'long' to
'const int' [-Wshorten-64-to-32]
const int itemsToErase = aend - abegin;
~~~~~~~~~~~~ ~~~~~^~~~~~~~
... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:740:39:
warning: implicit conversion loses integer precision: 'long' to
'const int' [-Wshorten-64-to-32]
const int itemsUntouched = abegin - d->begin();
~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~~~~
Change-Id: I52d85908f4aac20c7e9ac8063ac760ce52f85541
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>