add Tag_Compare()

This commit is contained in:
Nev3r 2020-04-12 13:05:21 +02:00
parent ab2619d538
commit bfd48c4c83
2 changed files with 15 additions and 0 deletions

View File

@ -6,3 +6,17 @@ void Tag_Add (taglist_t* list, const UINT16 tag)
list->tags = Z_Realloc(list->tags, (list->count + 1) * sizeof(list->tags), PU_LEVEL, NULL);
list->tags[list->count++] = tag;
}
boolean Tag_Compare (const taglist_t* list1, const taglist_t* list2)
{
size_t i;
if (list1->count != list2->count)
return false;
for (i = 0; i < list1->count; i++)
if (list1->tags[i] != list2->tags[i])
return false;
return true;
}

View File

@ -11,4 +11,5 @@ typedef struct
} taglist_t;
void Tag_Add (taglist_t* list, const UINT16 tag);
boolean Tag_Compare (const taglist_t* list1, const taglist_t* list2);
#endif //__R_TAGLIST__