From 0c2ccf2d209ed1ef726d91b25661540f087771a3 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 23 Feb 2011 23:26:15 -0800 Subject: [PATCH] We do not require unit_list, quicklists are the future. --- src/bindings/bind_unit.c | 1 - src/kernel/types.h | 1 - src/kernel/unit.c | 23 ----------------------- src/kernel/unit.h | 8 -------- 4 files changed, 33 deletions(-) diff --git a/src/bindings/bind_unit.c b/src/bindings/bind_unit.c index 7084571d8..c7ff2a345 100644 --- a/src/bindings/bind_unit.c +++ b/src/bindings/bind_unit.c @@ -946,7 +946,6 @@ tolua_unit_open(lua_State * L) { /* register user types */ tolua_usertype(L, TOLUA_CAST "unit"); - tolua_usertype(L, TOLUA_CAST "unit_list"); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); diff --git a/src/kernel/types.h b/src/kernel/types.h index 9c16e63ac..0f558386e 100644 --- a/src/kernel/types.h +++ b/src/kernel/types.h @@ -66,7 +66,6 @@ struct storage; struct strlist; struct terrain_type; struct unit; -struct unit_list; struct weapon_type; typedef struct ursprung { diff --git a/src/kernel/unit.c b/src/kernel/unit.c index 102f84656..92ab35e3b 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1393,29 +1393,6 @@ free_unit(unit * u) } } - -void -unitlist_clear(struct unit_list **ul) -{ - while (*ul) { - unit_list * rl2 = (*ul)->next; - free(*ul); - *ul = rl2; - } -} - -void -unitlist_insert(struct unit_list **ul, struct unit *u) -{ - unit_list *rl2 = (unit_list*)malloc(sizeof(unit_list)); - - rl2->data = u; - rl2->next = *ul; - - *ul = rl2; -} - - static void createunitid(unit *u, int id) { diff --git a/src/kernel/unit.h b/src/kernel/unit.h index 86af46741..3eb2de3d9 100644 --- a/src/kernel/unit.h +++ b/src/kernel/unit.h @@ -110,14 +110,6 @@ typedef struct unit { int wants; /* enno: attribut? */ } unit; -typedef struct unit_list { - struct unit_list * next; - struct unit * data; -} unit_list; - -extern void unitlist_clear(struct unit_list **ul); -extern void unitlist_insert(struct unit_list **ul, struct unit *u); - extern struct attrib_type at_alias; extern struct attrib_type at_siege; extern struct attrib_type at_target;