core/tags/library: Move library_remove() out of tags namespace

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-09-28 09:55:29 -04:00
parent a288922b65
commit d7cff5faf4
4 changed files with 6 additions and 10 deletions

View File

@ -193,7 +193,7 @@ void collection :: remove(struct library *library)
if (library) { if (library) {
set_enabled(library, false); set_enabled(library, false);
tags :: remove_library_tracks(library); tags :: remove_library_tracks(library);
tags :: remove_library(library); library_remove(library);
} }
} }

View File

@ -83,7 +83,7 @@ struct library *library_get(const unsigned int index)
return db_at(&library_db, index); return db_at(&library_db, index);
} }
void tags :: remove_library(struct library *library) void library_remove(struct library *library)
{ {
if (library) if (library)
db_remove(&library_db, library); db_remove(&library_db, library);

View File

@ -92,13 +92,6 @@ namespace tags
/** Called to read the library_db from disk. */ /** Called to read the library_db from disk. */
void init_library_db(); void init_library_db();
/**
* Called to remove a specific Library tag.
*
* @param library The Library tag to remove.
*/
void remove_library(struct library *);
/** /**
* Called to find the number of rows in the library_db, * Called to find the number of rows in the library_db,
* including NULL rows. * including NULL rows.
@ -115,4 +108,7 @@ struct library *library_find(const std::string &);
/* Called to get a library tag with a specific index. */ /* Called to get a library tag with a specific index. */
struct library *library_get(const unsigned int); struct library *library_get(const unsigned int);
/* Called to remove a specific library tag. */
void library_remove(struct library *);
#endif /* OCARINA_CORE_TAGS_LIBRARY_H */ #endif /* OCARINA_CORE_TAGS_LIBRARY_H */

View File

@ -91,7 +91,7 @@ static void test_library_db()
test_not_equal(library2, NULL); test_not_equal(library2, NULL);
test_verify_zelda(library2); test_verify_zelda(library2);
tags :: remove_library(library); library_remove(library);
test_equal(library_get(0), (struct library *)NULL); test_equal(library_get(0), (struct library *)NULL);
test_equal(tags :: library_size(), 1); test_equal(tags :: library_size(), 1);