diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 72f9e4104c..ab02846ce1 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -194,12 +194,12 @@ public: return *(end() - 1); } inline bool isEmpty() const { return size() == 0; } - inline void resize(qsizetype size); + void resize(qsizetype sz) { reallocate(sz, qMax(sz, capacity())); } inline void clear() { resize(0); } - inline void squeeze(); + void squeeze() { reallocate(size(), size()); } inline qsizetype capacity() const { return a; } - inline void reserve(qsizetype size); + void reserve(qsizetype sz) { if (sz > capacity()) reallocate(size(), sz); } template inline qsizetype indexOf(const AT &t, qsizetype from = 0) const; @@ -416,14 +416,6 @@ Q_INLINE_TEMPLATE QVarLengthArray::QVarLengthArray(qsizetype asize) } } -template -Q_INLINE_TEMPLATE void QVarLengthArray::resize(qsizetype asize) -{ reallocate(asize, qMax(asize, capacity())); } - -template -Q_INLINE_TEMPLATE void QVarLengthArray::reserve(qsizetype asize) -{ if (asize > capacity()) reallocate(size(), asize); } - template template Q_INLINE_TEMPLATE qsizetype QVarLengthArray::indexOf(const AT &t, qsizetype from) const @@ -492,10 +484,6 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray::append(const T *abuf, qs s = asize; } -template -Q_INLINE_TEMPLATE void QVarLengthArray::squeeze() -{ reallocate(size(), size()); } - template Q_OUTOFLINE_TEMPLATE void QVarLengthArray::reallocate(qsizetype asize, qsizetype aalloc) {