aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tag/Tag.cxx56
-rw-r--r--src/tag/Tag.hxx14
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);
};