OSDN Git Service

move inline QSet::reserve() to class scope
authorIvailo Monev <xakepa10@laimg.moc>
Sun, 23 Jun 2019 16:12:43 +0000 (16:12 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sun, 23 Jun 2019 16:12:43 +0000 (16:12 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/tools/qset.h

index 5718eca..54afd6f 100644 (file)
@@ -68,7 +68,8 @@ public:
     inline bool isEmpty() const { return q_hash.isEmpty(); }
 
     inline int capacity() const { return q_hash.capacity(); }
-    inline void reserve(int size);
+    inline void reserve(int size) { q_hash.reserve(size); }
+
     inline void squeeze() { q_hash.squeeze(); }
 
     inline void detach() { q_hash.detach(); }
@@ -217,9 +218,6 @@ private:
 };
 
 template <class T>
-Q_INLINE_TEMPLATE void QSet<T>::reserve(int asize) { q_hash.reserve(asize); }
-
-template <class T>
 Q_INLINE_TEMPLATE QSet<T> &QSet<T>::unite(const QSet<T> &other)
 {
     QSet<T> copy(other);