aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/lockbox/queue.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/shared/lockbox/queue.lua')
-rw-r--r--gamemode/shared/lockbox/queue.lua47
1 files changed, 0 insertions, 47 deletions
diff --git a/gamemode/shared/lockbox/queue.lua b/gamemode/shared/lockbox/queue.lua
deleted file mode 100644
index 55b067d..0000000
--- a/gamemode/shared/lockbox/queue.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-local Queue = function()
- local queue = {};
- local tail = 0;
- local head = 0;
-
- local public = {};
-
- public.push = function(obj)
- queue[head] = obj;
- head = head + 1;
- return;
- end
-
- public.pop = function()
- if tail < head
- then
- local obj = queue[tail];
- queue[tail] = nil;
- tail = tail + 1;
- return obj;
- else
- return nil;
- end
- end
-
- public.size = function()
- return head - tail;
- end
-
- public.getHead = function()
- return head;
- end
-
- public.getTail = function()
- return tail;
- end
-
- public.reset = function()
- queue = {};
- head = 0;
- tail = 0;
- end
-
- return public;
-end
-
-return Queue;