diff options
author | Max Kellermann <max@duempel.org> | 2013-09-05 18:10:10 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-05 18:27:31 +0200 |
commit | 6239dd96f2250c75e5d223a99e9bb7efa736daa3 (patch) | |
tree | e949582aea4d4381c465077fbd9ed7ba248187cf /src | |
parent | 57a4700fb95ba29cb3817b540d3ac4a3dcde2253 (diff) | |
download | mpd-6239dd96f2250c75e5d223a99e9bb7efa736daa3.tar.gz mpd-6239dd96f2250c75e5d223a99e9bb7efa736daa3.tar.xz mpd-6239dd96f2250c75e5d223a99e9bb7efa736daa3.zip |
Tag: remove unused methods
Diffstat (limited to 'src')
-rw-r--r-- | src/tag/Tag.cxx | 56 | ||||
-rw-r--r-- | src/tag/Tag.hxx | 14 |
2 files changed, 0 insertions, 70 deletions
diff --git a/src/tag/Tag.cxx b/src/tag/Tag.cxx index 2b1967006..20711f1cc 100644 --- a/src/tag/Tag.cxx +++ b/src/tag/Tag.cxx @@ -106,42 +106,6 @@ Tag::Clear() num_items = 0; } -void -Tag::DeleteItem(unsigned idx) -{ - assert(idx < num_items); - --num_items; - - tag_pool_lock.lock(); - tag_pool_put_item(items[idx]); - tag_pool_lock.unlock(); - - if (num_items - idx > 0) { - memmove(items + idx, items + idx + 1, - (num_items - idx) * sizeof(items[0])); - } - - if (num_items > 0) { - items = (TagItem **) - g_realloc(items, items_size(*this)); - } else { - g_free(items); - items = nullptr; - } -} - -void -Tag::ClearItemsByType(tag_type type) -{ - for (unsigned i = 0; i < num_items; i++) { - if (items[i]->type == type) { - DeleteItem(i); - /* decrement since when just deleted this node */ - i--; - } - } -} - Tag::~Tag() { tag_pool_lock.lock(); @@ -252,26 +216,6 @@ Tag::HasType(tag_type type) const return GetValue(type) != nullptr; } -bool -Tag::Equals(const Tag &other) const -{ - if (time != other.time) - return false; - - if (num_items != other.num_items) - return false; - - for (unsigned i = 0; i < num_items; i++) { - if (items[i]->type != other.items[i]->type) - return false; - if (strcmp(items[i]->value, other.items[i]->value)) { - return false; - } - } - - return true; -} - /** * Replace invalid sequences with the question mark. */ diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx index 2c5f599e2..51b6178be 100644 --- a/src/tag/Tag.hxx +++ b/src/tag/Tag.hxx @@ -117,13 +117,6 @@ struct Tag { */ void Clear(); - void DeleteItem(unsigned i); - - /** - * Clear all tag items with the specified type. - */ - void ClearItemsByType(tag_type type); - /** * Gives an optional hint to the tag library that we will now * add several tag items; this is used by the library to @@ -187,13 +180,6 @@ struct Tag { */ bool HasType(tag_type type) const; - /** - * Compares two tags, including the duration and all tag items. The - * order of the tag items matters. - */ - gcc_pure - bool Equals(const Tag &other) const; - private: void AddItemInternal(tag_type type, const char *value, size_t len); }; |