diff options
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r-- | src/corelib/tools/qhash.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 992ff33b94..21fca2dd05 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -287,6 +287,7 @@ public: inline QHash<Key, T> &operator=(QHash<Key, T> &&other) { qSwap(d, other.d); return *this; } #endif + inline void swap(QHash<Key, T> &other) { qSwap(d, other.d); } bool operator==(const QHash<Key, T> &other) const; inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); } @@ -925,6 +926,7 @@ class QMultiHash : public QHash<Key, T> public: QMultiHash() {} QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {} + inline void swap(QMultiHash<Key, T> &other) { QHash<Key, T>::swap(other); } // prevent QMultiHash<->QHash swaps inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value) { return QHash<Key, T>::insert(key, value); } |