Diff

util/queue.lua @ 9925:8d0112413997

Backed out changeset 3eea63a68e0f Commit included intended changes to loggingmanager
author Matthew Wild <mwild1@gmail.com>
date Tue, 26 Mar 2019 13:51:06 +0000
parent 9902:3eea63a68e0f
child 9926:1bfd28e774db
line wrap: on
line diff
--- a/util/queue.lua	Mon Mar 25 14:37:43 2019 +0000
+++ b/util/queue.lua	Tue Mar 26 13:51:06 2019 +0000
@@ -52,15 +52,16 @@
 			return t[tail];
 		end;
 		items = function (self)
-			return function (_, pos)
-				if pos >= items then
+			--luacheck: ignore 431/t
+			return function (t, pos)
+				if pos >= t:count() then
 					return nil;
 				end
 				local read_pos = tail + pos;
-				if read_pos > self.size then
+				if read_pos > t.size then
 					read_pos = (read_pos%size);
 				end
-				return pos+1, t[read_pos];
+				return pos+1, t._items[read_pos];
 			end, self, 0;
 		end;
 		consume = function (self)