aboutsummaryrefslogtreecommitdiff
path: root/layer.h
diff options
context:
space:
mode:
Diffstat (limited to 'layer.h')
-rw-r--r--layer.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/layer.h b/layer.h
index ce9a417..1bbe7e6 100644
--- a/layer.h
+++ b/layer.h
@@ -2,6 +2,7 @@
#define __HAVE_LAYER_H
#include <string.h>
+#include <bsd/sys/queue.h>
#include <SDL.h>
#include <SDL_thread.h>
@@ -10,7 +11,7 @@ class Layer {
SDL_mutex *mutex;
public:
- Layer *next;
+ SLIST_ENTRY(Layer) layers;
char *name;
@@ -43,7 +44,7 @@ public:
};
class LayerList {
- Layer *head;
+ SLIST_HEAD(layers_head, Layer) head;
SDL_mutex *mutex;
@@ -59,8 +60,9 @@ class LayerList {
}
public:
- LayerList() : head(NULL)
+ LayerList()
{
+ SLIST_INIT(&head);
mutex = SDL_CreateMutex();
}
~LayerList()