mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Return a reference to the current list from append().
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336591 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
4aaa73f613
commit
65bf71cd61
@ -109,14 +109,16 @@ namespace TagLib {
|
||||
void sortedInsert(const T &value, bool unique = false);
|
||||
|
||||
/*!
|
||||
* Appends \a item to the end of the list.
|
||||
* Appends \a item to the end of the list and returns a reference to the
|
||||
* list.
|
||||
*/
|
||||
void append(const T &item);
|
||||
List<T> &append(const T &item);
|
||||
|
||||
/*!
|
||||
* Appends all of the values in \a l to the end of the list.
|
||||
* Appends all of the values in \a l to the end of the list and returns a
|
||||
* reference to the list.
|
||||
*/
|
||||
void append(const List<T> &l);
|
||||
List<T> &append(const List<T> &l);
|
||||
|
||||
/*!
|
||||
* Clears the list. If auto deletion is enabled and this list contains a
|
||||
|
@ -149,17 +149,19 @@ void List<T>::sortedInsert(const T &value, bool unique)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void List<T>::append(const T &item)
|
||||
List<T> &List<T>::append(const T &item)
|
||||
{
|
||||
detach();
|
||||
d->list.push_back(item);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void List<T>::append(const List<T> &l)
|
||||
List<T> &List<T>::append(const List<T> &l)
|
||||
{
|
||||
detach();
|
||||
d->list.insert(d->list.end(), l.begin(), l.end());
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
Loading…
x
Reference in New Issue
Block a user