From 644b47910f05149c35a5a27a4796a66cf1431e0f Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Thu, 28 Nov 2013 14:09:16 +0900 Subject: [PATCH] Removed some unused #ifdefs --- taglib/toolkit/tbytevectorlist.cpp | 18 ------------- taglib/toolkit/tbytevectorlist.h | 22 ---------------- taglib/toolkit/tstringlist.cpp | 36 +------------------------ taglib/toolkit/tstringlist.h | 42 ------------------------------ 4 files changed, 1 insertion(+), 117 deletions(-) diff --git a/taglib/toolkit/tbytevectorlist.cpp b/taglib/toolkit/tbytevectorlist.cpp index 02d22f86..6504711e 100644 --- a/taglib/toolkit/tbytevectorlist.cpp +++ b/taglib/toolkit/tbytevectorlist.cpp @@ -68,30 +68,12 @@ ByteVectorList::ByteVectorList(const ByteVectorList &l) : List(l) { } -#ifdef TAGLIB_USE_MOVE_SEMANTICS - -ByteVectorList::ByteVectorList(ByteVectorList &&l) : List(l) -{ -} - -#endif - ByteVectorList &ByteVectorList::operator=(const ByteVectorList &l) { List::operator=(l); return *this; } -#ifdef TAGLIB_USE_MOVE_SEMANTICS - -ByteVectorList &ByteVectorList::operator=(ByteVectorList &&l) -{ - List::operator=(l); - return *this; -} - -#endif - ByteVector ByteVectorList::toByteVector(const ByteVector &separator) const { ByteVector v; diff --git a/taglib/toolkit/tbytevectorlist.h b/taglib/toolkit/tbytevectorlist.h index ab099e8b..fd82322c 100644 --- a/taglib/toolkit/tbytevectorlist.h +++ b/taglib/toolkit/tbytevectorlist.h @@ -54,17 +54,6 @@ namespace TagLib { */ ByteVectorList(const ByteVectorList &l); -#ifdef TAGLIB_USE_MOVE_SEMANTICS - - /*! - * Moves \a l into this ByteVectorList. - * - * \note Not available unless TAGLIB_USE_MOVE_SEMANTICS macro is defined. - */ - ByteVectorList(ByteVectorList &&l); - -#endif - /*! * Make a shallow, implicitly shared, copy of \a l. Because this is * implicitly shared, this method is lightweight and suitable for @@ -72,17 +61,6 @@ namespace TagLib { */ ByteVectorList &operator=(const ByteVectorList &l); -#ifdef TAGLIB_USE_MOVE_SEMANTICS - - /*! - * Moves \a l into this ByteVectorList. - * - * \note Not available unless TAGLIB_USE_MOVE_SEMANTICS macro is defined. - */ - ByteVectorList &operator=(ByteVectorList &&l); - -#endif - /*! * Convert the ByteVectorList to a ByteVector separated by \a separator. By * default a space is used. diff --git a/taglib/toolkit/tstringlist.cpp b/taglib/toolkit/tstringlist.cpp index 59221b11..19fd082f 100644 --- a/taglib/toolkit/tstringlist.cpp +++ b/taglib/toolkit/tstringlist.cpp @@ -38,7 +38,7 @@ StringList StringList::split(const String &s, const String &pattern) size_t previousOffset = 0; for(size_t offset = s.find(pattern); offset != String::npos; - offset = s.find(pattern, offset + 1)) + offset = s.find(pattern, offset + 1)) { l.append(s.substr(previousOffset, offset - previousOffset)); previousOffset = offset + 1; @@ -61,14 +61,6 @@ StringList::StringList(const StringList &l) : List(l) { } -#ifdef TAGLIB_USE_MOVE_SEMANTICS - -StringList::StringList(StringList &&l) : List(l) -{ -} - -#endif - StringList::StringList(const String &s) : List() { append(s); @@ -111,38 +103,12 @@ StringList &StringList::append(const StringList &l) return *this; } -#ifdef TAGLIB_USE_MOVE_SEMANTICS - -StringList &StringList::append(String &&s) -{ - List::append(s); - return *this; -} - -StringList &StringList::append(StringList &&l) -{ - List::append(l); - return *this; -} - -#endif - StringList &StringList::operator=(const StringList &l) { List::operator=(l); return *this; } -#ifdef TAGLIB_USE_MOVE_SEMANTICS - -StringList &StringList::operator=(StringList &&l) -{ - List::operator=(l); - return *this; -} - -#endif - //////////////////////////////////////////////////////////////////////////////// // related functions //////////////////////////////////////////////////////////////////////////////// diff --git a/taglib/toolkit/tstringlist.h b/taglib/toolkit/tstringlist.h index e2119a92..ce42ac30 100644 --- a/taglib/toolkit/tstringlist.h +++ b/taglib/toolkit/tstringlist.h @@ -58,17 +58,6 @@ namespace TagLib { */ StringList(const StringList &l); -#ifdef TAGLIB_USE_MOVE_SEMANTICS - - /*! - * Constructs a StringList equivalent to \a l. - * - * \note Not available unless TAGLIB_USE_MOVE_SEMANTICS macro is defined. - */ - StringList(StringList &&l); - -#endif - /*! * Constructs a StringList with \a s as a member. */ @@ -99,26 +88,6 @@ namespace TagLib { */ StringList &append(const StringList &l); -#ifdef TAGLIB_USE_MOVE_SEMANTICS - - /*! - * Appends \a s to the end of the list and returns a reference to the - * list. - * - * \note Not available unless TAGLIB_USE_MOVE_SEMANTICS macro is defined. - */ - StringList &append(String &&s); - - /*! - * Appends all of the values in \a l to the end of the list and returns a - * reference to the list. - * - * \note Not available unless TAGLIB_USE_MOVE_SEMANTICS macro is defined. - */ - StringList &append(StringList &&l); - -#endif - /*! * Make a shallow, implicitly shared, copy of \a l. Because this is * implicitly shared, this method is lightweight and suitable for @@ -126,17 +95,6 @@ namespace TagLib { */ StringList &operator=(const StringList &l); -#ifdef TAGLIB_USE_MOVE_SEMANTICS - - /*! - * Moves \a l into this StringList. - * - * \note Not available unless TAGLIB_USE_MOVE_SEMANTICS macro is defined. - */ - StringList &operator=(StringList &&l); - -#endif - /*! * Splits the String \a s into several strings at \a pattern. This will not include * the pattern in the returned strings.