From 43a570f5b2b738bfe7db0ea6ef5b68928b7c340b Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Fri, 6 Aug 2004 21:51:32 +0000 Subject: [PATCH] Add overloads here so that the return type is in fact StringList. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@336601 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- toolkit/tstringlist.cpp | 12 ++++++++++++ toolkit/tstringlist.h | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/toolkit/tstringlist.cpp b/toolkit/tstringlist.cpp index 7f657459..f03684f8 100644 --- a/toolkit/tstringlist.cpp +++ b/toolkit/tstringlist.cpp @@ -87,6 +87,18 @@ String StringList::toString(const String &separator) const return s; } +StringList &StringList::append(const String &s) +{ + List::append(s); + return *this; +} + +StringList &StringList::append(const StringList &l) +{ + List::append(l); + return *this; +} + //////////////////////////////////////////////////////////////////////////////// // related functions //////////////////////////////////////////////////////////////////////////////// diff --git a/toolkit/tstringlist.h b/toolkit/tstringlist.h index 7011c86b..33dec4b7 100644 --- a/toolkit/tstringlist.h +++ b/toolkit/tstringlist.h @@ -67,6 +67,18 @@ namespace TagLib { */ String toString(const String &separator = " ") const; + /*! + * Appends \a s to the end of the list and returns a reference to the + * list. + */ + StringList &append(const String &s); + + /*! + * Appends all of the values in \a l to the end of the list and returns a + * reference to the list. + */ + StringList &append(const StringList &l); + /*! * Splits the String \a s into several strings at \a pattern. This will not include * the pattern in the returned strings.