From 8514896b9cc5b4f313ccab95b5e7135dd9ef4297 Mon Sep 17 00:00:00 2001 From: Santos Date: Sun, 28 Oct 2012 23:37:35 +1100 Subject: [PATCH] Timed entry removal working again --- cron.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cron.lua b/cron.lua index 1ededbe..784028b 100644 --- a/cron.lua +++ b/cron.lua @@ -79,12 +79,8 @@ end function cron.update(dt) assert(type(dt) == "number" and dt >= 0, "dt must be a non-negative number") - local expired = {} for id, entry in pairs(entries) do - if entry:update(dt) then expired[id] = true end - end - for id,_ in pairs(expired) do - entries[id] = nil + if entry:update(dt) then entries[id] = nil end end end