QList: fix some integer cast warnings from 64- to 32-bit
Not tested because we're not promising to fix them all. Just those two that were reported. Fixes: QTBUG-77391 Change-Id: Iec9c051acd73484c8d94fffd15b91f5e6348635d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
d502b19b28
commit
ffc2d57223
@ -111,7 +111,7 @@ struct Q_CORE_EXPORT QListData {
|
||||
void remove(int i);
|
||||
void remove(int i, int n);
|
||||
void move(int from, int to);
|
||||
inline int size() const Q_DECL_NOTHROW { return d->end - d->begin; }
|
||||
inline int size() const Q_DECL_NOTHROW { return int(d->end - d->begin); } // q6sizetype
|
||||
inline bool isEmpty() const Q_DECL_NOTHROW { return d->end == d->begin; }
|
||||
inline void **at(int i) const Q_DECL_NOTHROW { return d->array + d->begin + i; }
|
||||
inline void **begin() const Q_DECL_NOTHROW { return d->array + d->begin; }
|
||||
@ -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 n - b;
|
||||
return typename QList<T>::difference_type(n - b);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user