summaryrefslogtreecommitdiff
path: root/src/idlist.c
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2019-07-28 21:23:27 +0300
committerOxore <oxore@protonmail.com>2019-07-28 22:03:03 +0300
commit1a0886d852bb8a0d9428dc6f54c1e503d06073a0 (patch)
tree0b49cd355b514f4bd5877f08a41fad7f6269a3e1 /src/idlist.c
parenteae3a50f9c791c9aa7dae39cc87d63e0488c4cee (diff)
Refactor idlist, move all global vars to local scope
- Replace list_foreach with LIST_FOREACH macro. - Remove `game` global variable and make it local everywhere. - Move global vars `fld`, `nxt` and `texts` into `game` struct. - Add `static` qualifier to engine.c's specific global vars. - Move `sfRenderWindow window` global var to local scope
Diffstat (limited to 'src/idlist.c')
-rw-r--r--src/idlist.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/idlist.c b/src/idlist.c
index 14db85f..e4e7c91 100644
--- a/src/idlist.c
+++ b/src/idlist.c
@@ -45,15 +45,6 @@ void list_rm_node(struct idlist *node)
}
}
-void list_foreach(struct idlist *list, void (*job)(void *))
-{
- if (list) {
- job(list->obj);
- while ((list = list->next))
- job(list->obj);
- }
-}
-
void list_destroy(struct idlist *list)
{
if (list) {