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:
Scott Wheeler 2006-09-16 12:09:48 +00:00
parent 52ec948d7e
commit fdb603c88f
2 changed files with 6 additions and 8 deletions

View File

@ -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.

View File

@ -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>