From 7ffaf91617360a046c3c03a93fdb33f650e88bd8 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sun, 25 Oct 2015 04:41:03 -0400 Subject: [PATCH] core/tags/track: Move track_remove() out of the tags namespace Signed-off-by: Anna Schumaker --- core/library.cpp | 2 +- core/tags/track.cpp | 2 +- include/core/tags/track.h | 10 +++------- tests/core/tags/track.cpp | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/core/library.cpp b/core/library.cpp index dda82eeb..754224c4 100644 --- a/core/library.cpp +++ b/core/library.cpp @@ -151,7 +151,7 @@ static void validate_library(struct library *&library) if (g_file_test(track->path().c_str(), G_FILE_TEST_EXISTS) == false) { library_q.del(track); - tags :: remove_track(track); + track_remove(track); } } } diff --git a/core/tags/track.cpp b/core/tags/track.cpp index 44a52c58..14075561 100644 --- a/core/tags/track.cpp +++ b/core/tags/track.cpp @@ -164,7 +164,7 @@ struct track *track_add(struct album *album, struct artist *artist, path, name, length, track)); } -void tags :: remove_track(struct track *track) +void track_remove(struct track *track) { db_remove(&track_db, track); } diff --git a/include/core/tags/track.h b/include/core/tags/track.h index bc31e02c..abb4b335 100644 --- a/include/core/tags/track.h +++ b/include/core/tags/track.h @@ -120,13 +120,6 @@ namespace tags /** Called to read the track_db from disk. */ void init_track_db(); - /** - * Called to remove a Track tag from the database. - * - * @param track The Track tag to be removed. - */ - void remove_track(struct track *); - /** * Called to remove all tracks associated with a specific Library. * @@ -152,6 +145,9 @@ struct track *track_add(struct album *, struct artist *, struct genre *, struct library *, const std::string &, const std::string &, unsigned int, unsigned int); +/* Called to remove a specific track tag. */ +void track_remove(struct track *); + /* Called to get a track tag with a specific index. */ struct track *track_get(const unsigned int); diff --git a/tests/core/tags/track.cpp b/tests/core/tags/track.cpp index 18b43f44..86783972 100644 --- a/tests/core/tags/track.cpp +++ b/tests/core/tags/track.cpp @@ -151,7 +151,7 @@ static void test_track_tag_lookup() index = a->index(); - tags :: remove_track(a); + track_remove(a); test_equal(track_get(index), (struct track *)NULL); test_track_tag_load_db(2); tags :: commit_track_db();