mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: remove unused taglist functions
No users of taglist_added() and taglist_contains(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5ac64ab2cd
commit
92c3837f6e
2 changed files with 0 additions and 24 deletions
22
core/tag.c
22
core/tag.c
|
@ -181,25 +181,3 @@ void taglist_init_global()
|
||||||
for (i = 0; i < sizeof(default_tags) / sizeof(char *); i++)
|
for (i = 0; i < sizeof(default_tags) / sizeof(char *); i++)
|
||||||
taglist_add_tag(&g_tag_list, default_tags[i]);
|
taglist_add_tag(&g_tag_list, default_tags[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool taglist_contains(struct tag_entry *tag_list, const char *tag)
|
|
||||||
{
|
|
||||||
while (tag_list) {
|
|
||||||
if (same_string(tag_list->tag->name, tag))
|
|
||||||
return true;
|
|
||||||
tag_list = tag_list->next;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tag_entry *taglist_added(struct tag_entry *original_list, struct tag_entry *new_list)
|
|
||||||
{
|
|
||||||
struct tag_entry *added_list = NULL;
|
|
||||||
while (new_list) {
|
|
||||||
if (!taglist_contains(original_list, new_list->tag->name))
|
|
||||||
taglist_add_tag(&added_list, new_list->tag->name);
|
|
||||||
new_list = new_list->next;
|
|
||||||
}
|
|
||||||
return added_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ struct tag_entry {
|
||||||
extern struct tag_entry *g_tag_list;
|
extern struct tag_entry *g_tag_list;
|
||||||
|
|
||||||
struct divetag *taglist_add_tag(struct tag_entry **tag_list, const char *tag);
|
struct divetag *taglist_add_tag(struct tag_entry **tag_list, const char *tag);
|
||||||
struct tag_entry *taglist_added(struct tag_entry *original_list, struct tag_entry *new_list);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Writes all divetags form tag_list into internally allocated buffer
|
* Writes all divetags form tag_list into internally allocated buffer
|
||||||
|
@ -52,7 +51,6 @@ void taglist_cleanup(struct tag_entry **tag_list);
|
||||||
void taglist_init_global();
|
void taglist_init_global();
|
||||||
void taglist_free(struct tag_entry *tag_list);
|
void taglist_free(struct tag_entry *tag_list);
|
||||||
struct tag_entry *taglist_copy(struct tag_entry *s);
|
struct tag_entry *taglist_copy(struct tag_entry *s);
|
||||||
bool taglist_contains(struct tag_entry *tag_list, const char *tag);
|
|
||||||
void taglist_merge(struct tag_entry **dst, struct tag_entry *src1, struct tag_entry *src2);
|
void taglist_merge(struct tag_entry **dst, struct tag_entry *src1, struct tag_entry *src2);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Add table
Reference in a new issue