We do not require unit_list, quicklists are the future.

This commit is contained in:
Enno Rehling 2011-02-23 23:26:15 -08:00
parent d479075c53
commit 0c2ccf2d20
4 changed files with 0 additions and 33 deletions

View File

@ -946,7 +946,6 @@ tolua_unit_open(lua_State * L)
{ {
/* register user types */ /* register user types */
tolua_usertype(L, TOLUA_CAST "unit"); tolua_usertype(L, TOLUA_CAST "unit");
tolua_usertype(L, TOLUA_CAST "unit_list");
tolua_module(L, NULL, 0); tolua_module(L, NULL, 0);
tolua_beginmodule(L, NULL); tolua_beginmodule(L, NULL);

View File

@ -66,7 +66,6 @@ struct storage;
struct strlist; struct strlist;
struct terrain_type; struct terrain_type;
struct unit; struct unit;
struct unit_list;
struct weapon_type; struct weapon_type;
typedef struct ursprung { typedef struct ursprung {

View File

@ -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 static void
createunitid(unit *u, int id) createunitid(unit *u, int id)
{ {

View File

@ -110,14 +110,6 @@ typedef struct unit {
int wants; /* enno: attribut? */ int wants; /* enno: attribut? */
} unit; } 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_alias;
extern struct attrib_type at_siege; extern struct attrib_type at_siege;
extern struct attrib_type at_target; extern struct attrib_type at_target;