QVarLengthArray: merge remove(idx [,n]) into one function
remove(i) is the same as remove(i, 1), and the extra 'n' argument is of trivial type, so it's ok to default it instead of overloading. Change-Id: Id926cd63fde518e002684a41e055edc1004247a4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
31f155d985
commit
ab1180a2b0
|
|
@ -260,8 +260,7 @@ public:
|
|||
void insert(qsizetype i, const T &t);
|
||||
void insert(qsizetype i, qsizetype n, const T &t);
|
||||
void replace(qsizetype i, const T &t);
|
||||
void remove(qsizetype i);
|
||||
void remove(qsizetype i, qsizetype n);
|
||||
void remove(qsizetype i, qsizetype n = 1);
|
||||
template <typename AT = T>
|
||||
qsizetype removeAll(const AT &t);
|
||||
template <typename AT = T>
|
||||
|
|
@ -598,10 +597,6 @@ inline void QVarLengthArray<T, Prealloc>::remove(qsizetype i, qsizetype n)
|
|||
{ verify(i, n);
|
||||
erase(begin() + i, begin() + i + n); }
|
||||
template <class T, qsizetype Prealloc>
|
||||
inline void QVarLengthArray<T, Prealloc>::remove(qsizetype i)
|
||||
{ verify(i);
|
||||
erase(begin() + i, begin() + i + 1); }
|
||||
template <class T, qsizetype Prealloc>
|
||||
template <typename AT>
|
||||
inline qsizetype QVarLengthArray<T, Prealloc>::removeAll(const AT &t)
|
||||
{ return QtPrivate::sequential_erase_with_copy(*this, t); }
|
||||
|
|
|
|||
|
|
@ -569,16 +569,6 @@
|
|||
\sa operator[](), remove()
|
||||
*/
|
||||
|
||||
/*! \fn template<class T, qsizetype Prealloc> void QVarLengthArray<T, Prealloc>::remove(qsizetype i)
|
||||
|
||||
\overload
|
||||
\since 4.8
|
||||
|
||||
Removes the element at index position \a i.
|
||||
|
||||
\sa insert(), replace()
|
||||
*/
|
||||
|
||||
/*! \fn template<class T, qsizetype Prealloc> void QVarLengthArray<T, Prealloc>::remove(qsizetype i, qsizetype count)
|
||||
|
||||
\overload
|
||||
|
|
|
|||
Loading…
Reference in New Issue