QList: make cast from ptrdiff_t to int explicit

Amends ffc2d57223.

Fixes: QTBUG-78235
Change-Id: Ie91d8d71c92bb62e3268847407b7b252c382d700
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Edward Welbourne 2019-09-12 11:03:07 +02:00 committed by Marc Mutz
parent 46201f0e82
commit 2d8b80bb9c

View File

@ -1031,7 +1031,7 @@ int lastIndexOf(const QList<T> &list, const U &u, int from)
Node *n = reinterpret_cast<Node *>(list.p.at(from + 1));
while (n-- != b) {
if (n->t() == u)
return typename QList<T>::difference_type(n - b);
return int(n - b);
}
}
return -1;