]> granicus.if.org Git - taglib/commitdiff
Return a reference to the current list from append().
authorScott Wheeler <wheeler@kde.org>
Fri, 6 Aug 2004 21:07:46 +0000 (21:07 +0000)
committerScott Wheeler <wheeler@kde.org>
Fri, 6 Aug 2004 21:07:46 +0000 (21:07 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336591 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

toolkit/tlist.h
toolkit/tlist.tcc

index 7ed5627d5ca90dbf0452ae698b2462413c732800..3ea7a669e0a3e7a52b2227081e80a2e4b482a92c 100644 (file)
@@ -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
index 1064a1c5590f8e838064b6576c8a5e92396e1331..e94b85a7110fb782e4a92fa21876d5cc2ae61ba2 100644 (file)
@@ -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>