Rename the macros, reshape them slightly to avoid mixed declarations, and add a finalizer.

This commit is contained in:
Nev3r 2020-04-12 17:52:38 +02:00
parent f7f9b68bb9
commit cb2571b12c

View file

@ -29,23 +29,25 @@ void Taglist_AddToLines (const size_t tag, const size_t itemid);
void Taglist_AddToMapthings (const size_t tag, const size_t itemid);
#endif //__R_TAGLIST__
#define Tag_IterateSectors(tag, sc)\
size_t kk;\
#define TAG_ITER_SECTORS(tag, sc)\
if(tags_sectors[tag])\
{ size_t kk;\
for(kk = 0, sc = tags_sectors[tag]->elements[0];\
kk < tags_sectors[tag]->count;\
sc = tags_sectors[tag]->elements[++kk])
#define Tag_IterateLines(tag, li)\
size_t kk;\
#define TAG_ITER_LINES(tag, li)\
if(tags_lines[tag])\
{ size_t kk;\
for(kk = 0, li = tags_lines[tag]->elements[0];\
kk < tags_lines[tag]->count;\
li = tags_lines[tag]->elements[++kk])
#define Tag_IterateMapthings(tag, mt)\
size_t kk;\
#define TAG_ITER_THINGS(tag, mt)\
if(tags_mapthings[tag])\
{ size_t kk;\
for(kk = 0, mt = tags_mapthings[tag]->elements[0];\
kk < tags_mapthings[tag]->count;\
mt = tags_mapthings[tag]->elements[++kk])
#define TAG_ITER_END }