From 722f317f97d9a0a1a47065e32638b911d3046b87 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Thu, 19 Nov 2015 11:57:30 +0900 Subject: [PATCH] Remove ByteVector::null and isNull(). --- taglib/toolkit/tbytevector.cpp | 7 ------- taglib/toolkit/tbytevector.h | 24 ------------------------ tests/test_bytevector.cpp | 1 - 3 files changed, 32 deletions(-) diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index 2172a0fa..c420ba83 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -327,8 +327,6 @@ public: // static members //////////////////////////////////////////////////////////////////////////////// -const ByteVector ByteVector::null; - const size_t ByteVector::npos = static_cast(-1); ByteVector ByteVector::fromCString(const char *s, size_t length) @@ -679,11 +677,6 @@ ByteVector::ConstReverseIterator ByteVector::rend() const return v.rbegin() + (v.size() - d->offset); } -bool ByteVector::isNull() const -{ - return (d == null.d); -} - bool ByteVector::isEmpty() const { return (d->length == 0); diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h index 3948ea2d..0427b3fd 100644 --- a/taglib/toolkit/tbytevector.h +++ b/taglib/toolkit/tbytevector.h @@ -263,19 +263,6 @@ namespace TagLib { */ ConstReverseIterator rend() const; - /*! - * Returns true if the vector is null. - * - * \note A vector may be empty without being null. So do not use this - * method to check if the vector is empty. - * - * \see isEmpty() - * - * \deprecated - */ - // BIC: remove - bool isNull() const; - /*! * Returns true if the ByteVector is empty. * @@ -568,17 +555,6 @@ namespace TagLib { */ void swap(ByteVector &v); - /*! - * A static, empty ByteVector which is convenient and fast (since returning - * an empty or "null" value does not require instantiating a new ByteVector). - * - * \warning Do not modify this variable. It will mess up the internal state - * of TagLib. - * - * \deprecated - */ - static const ByteVector null; - /*! * When used as the value for a \a length or \a patternLength parameter * in ByteVector's member functions, means "until the end of the data". diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp index 4b0755be..1140082a 100644 --- a/tests/test_bytevector.cpp +++ b/tests/test_bytevector.cpp @@ -85,7 +85,6 @@ public: i.clear(); CPPUNIT_ASSERT(i.isEmpty()); - CPPUNIT_ASSERT(!i.isNull()); // deprecated, but worth it to check. } void testFind1()