mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
It makes more sense to return iterators here. (The return types weren't there
in the last release, so this isn't API breakage.) git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@585152 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
52ec948d7e
commit
fdb603c88f
@ -99,7 +99,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* Inserts a copy of \a value before \a it.
|
||||
*/
|
||||
List<T> &insert(Iterator it, const T &value);
|
||||
Iterator insert(Iterator it, const T &value);
|
||||
|
||||
/*!
|
||||
* Inserts the \a value into the list. This assumes that the list is
|
||||
@ -164,7 +164,7 @@ namespace TagLib {
|
||||
/*!
|
||||
* Erase the item at \a it from the list.
|
||||
*/
|
||||
List<T> &erase(Iterator it);
|
||||
Iterator erase(Iterator it);
|
||||
|
||||
/*!
|
||||
* Returns a reference to the first item in the list.
|
||||
|
@ -128,11 +128,10 @@ typename List<T>::ConstIterator List<T>::end() const
|
||||
}
|
||||
|
||||
template <class T>
|
||||
List<T> &List<T>::insert(Iterator it, const T &item)
|
||||
typename List<T>::Iterator List<T>::insert(Iterator it, const T &item)
|
||||
{
|
||||
detach();
|
||||
d->list.insert(it, item);
|
||||
return *this;
|
||||
return d->list.insert(it, item);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@ -219,10 +218,9 @@ bool List<T>::contains(const T &value) const
|
||||
}
|
||||
|
||||
template <class T>
|
||||
List<T> &List<T>::erase(Iterator it)
|
||||
typename List<T>::Iterator List<T>::erase(Iterator it)
|
||||
{
|
||||
d->list.erase(it);
|
||||
return *this;
|
||||
return d->list.erase(it);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
Loading…
Reference in New Issue
Block a user