From c3f9c635426dfa3b2728168a604431dc2e843aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sun, 4 Nov 2012 10:08:18 +0100 Subject: [PATCH] Unify ByteVectorList::split methods --- taglib/toolkit/tbytevectorlist.cpp | 6 ------ taglib/toolkit/tbytevectorlist.h | 9 +-------- taglib/toolkit/tstring.cpp | 5 ----- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/taglib/toolkit/tbytevectorlist.cpp b/taglib/toolkit/tbytevectorlist.cpp index 7ea893f1..4ab65803 100644 --- a/taglib/toolkit/tbytevectorlist.cpp +++ b/taglib/toolkit/tbytevectorlist.cpp @@ -36,12 +36,6 @@ class ByteVectorListPrivate // static members //////////////////////////////////////////////////////////////////////////////// -ByteVectorList ByteVectorList::split(const ByteVector &v, const ByteVector &pattern, - int byteAlign) -{ - return split(v, pattern, byteAlign, 0); -} - ByteVectorList ByteVectorList::split(const ByteVector &v, const ByteVector &pattern, int byteAlign, int max) { diff --git a/taglib/toolkit/tbytevectorlist.h b/taglib/toolkit/tbytevectorlist.h index 5852583a..17444522 100644 --- a/taglib/toolkit/tbytevectorlist.h +++ b/taglib/toolkit/tbytevectorlist.h @@ -65,12 +65,6 @@ namespace TagLib { */ ByteVector toByteVector(const ByteVector &separator = " ") const; - /*! - * Splits the ByteVector \a v into several strings at \a pattern. This will - * not include the pattern in the returned ByteVectors. - */ - static ByteVectorList split(const ByteVector &v, const ByteVector &pattern, - int byteAlign = 1); /*! * Splits the ByteVector \a v into several strings at \a pattern. This will * not include the pattern in the returned ByteVectors. \a max is the @@ -78,9 +72,8 @@ namespace TagLib { * is 2 then a maximum of 1 match will be found and the vector will be split * on that match. */ - // BIC: merge with the function above static ByteVectorList split(const ByteVector &v, const ByteVector &pattern, - int byteAlign, int max); + int byteAlign = 1, int max = 0); private: class ByteVectorListPrivate; ByteVectorListPrivate *d; diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp index 292f3533..402ce2b8 100644 --- a/taglib/toolkit/tstring.cpp +++ b/taglib/toolkit/tstring.cpp @@ -458,11 +458,6 @@ ByteVector String::data(Type t) const return v; } -int String::toInt() const -{ - return toInt(0); -} - int String::toInt(bool *ok) const { int value = 0;