Port QSet to qsizetype
Change-Id: I70ad8fb6908ce3837a723e9a095bee5c166739e4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
869ab57c99
commit
561e38f799
@ -78,12 +78,12 @@ public:
|
|||||||
QTypeTraits::compare_eq_result<U> operator!=(const QSet<T> &other) const
|
QTypeTraits::compare_eq_result<U> operator!=(const QSet<T> &other) const
|
||||||
{ return q_hash != other.q_hash; }
|
{ return q_hash != other.q_hash; }
|
||||||
|
|
||||||
inline int size() const { return q_hash.size(); }
|
inline qsizetype size() const { return q_hash.size(); }
|
||||||
|
|
||||||
inline bool isEmpty() const { return q_hash.isEmpty(); }
|
inline bool isEmpty() const { return q_hash.isEmpty(); }
|
||||||
|
|
||||||
inline int capacity() const { return q_hash.capacity(); }
|
inline qsizetype capacity() const { return q_hash.capacity(); }
|
||||||
inline void reserve(int size);
|
inline void reserve(qsizetype size);
|
||||||
inline void squeeze() { q_hash.squeeze(); }
|
inline void squeeze() { q_hash.squeeze(); }
|
||||||
|
|
||||||
inline void detach() { q_hash.detach(); }
|
inline void detach() { q_hash.detach(); }
|
||||||
@ -176,7 +176,7 @@ public:
|
|||||||
// more Qt
|
// more Qt
|
||||||
typedef iterator Iterator;
|
typedef iterator Iterator;
|
||||||
typedef const_iterator ConstIterator;
|
typedef const_iterator ConstIterator;
|
||||||
inline int count() const { return q_hash.count(); }
|
inline qsizetype count() const { return q_hash.count(); }
|
||||||
inline iterator insert(const T &value)
|
inline iterator insert(const T &value)
|
||||||
{ return static_cast<typename Hash::iterator>(q_hash.insert(value, QHashDummyValue())); }
|
{ return static_cast<typename Hash::iterator>(q_hash.insert(value, QHashDummyValue())); }
|
||||||
iterator find(const T &value) { return q_hash.find(value); }
|
iterator find(const T &value) { return q_hash.find(value); }
|
||||||
@ -195,7 +195,7 @@ public:
|
|||||||
typedef value_type &reference;
|
typedef value_type &reference;
|
||||||
typedef const value_type &const_reference;
|
typedef const value_type &const_reference;
|
||||||
typedef qptrdiff difference_type;
|
typedef qptrdiff difference_type;
|
||||||
typedef int size_type;
|
typedef qsizetype size_type;
|
||||||
|
|
||||||
inline bool empty() const { return isEmpty(); }
|
inline bool empty() const { return isEmpty(); }
|
||||||
// comfort
|
// comfort
|
||||||
@ -241,7 +241,7 @@ noexcept(noexcept(qHashRangeCommutative(key.begin(), key.end(), seed)))
|
|||||||
// inline function implementations
|
// inline function implementations
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
Q_INLINE_TEMPLATE void QSet<T>::reserve(int asize) { q_hash.reserve(asize); }
|
Q_INLINE_TEMPLATE void QSet<T>::reserve(qsizetype asize) { q_hash.reserve(asize); }
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
Q_INLINE_TEMPLATE QSet<T> &QSet<T>::unite(const QSet<T> &other)
|
Q_INLINE_TEMPLATE QSet<T> &QSet<T>::unite(const QSet<T> &other)
|
||||||
|
@ -4074,7 +4074,7 @@ QRhiImplementation::~QRhiImplementation()
|
|||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
if (!resources.isEmpty()) {
|
if (!resources.isEmpty()) {
|
||||||
qWarning("QRhi %p going down with %d unreleased resources that own native graphics objects. This is not nice.",
|
qWarning("QRhi %p going down with %d unreleased resources that own native graphics objects. This is not nice.",
|
||||||
q, resources.count());
|
q, int(resources.count()));
|
||||||
for (QRhiResource *res : qAsConst(resources)) {
|
for (QRhiResource *res : qAsConst(resources)) {
|
||||||
qWarning(" %s resource %p (%s)", resourceTypeStr(res), res, res->m_objectName.constData());
|
qWarning(" %s resource %p (%s)", resourceTypeStr(res), res, res->m_objectName.constData());
|
||||||
res->m_rhi = nullptr;
|
res->m_rhi = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user