refactoring
This commit is contained in:
+12
-12
@@ -11,10 +11,10 @@ CreateFrame('Frame'):SetScript('OnUpdate', function()
|
|||||||
wipe(tmp)
|
wipe(tmp)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--do
|
do
|
||||||
-- local t = setmetatable({}, {__metatable=false, newindex=error})
|
local t = setmetatable({}, {__metatable=false, __newindex=error})
|
||||||
-- public.O.get = t
|
public.O.get = t
|
||||||
--end
|
end
|
||||||
|
|
||||||
function wipe(t) -- like with a cloth or something
|
function wipe(t) -- like with a cloth or something
|
||||||
for k in t do t[k] = nil end
|
for k in t do t[k] = nil end
|
||||||
@@ -78,18 +78,18 @@ do
|
|||||||
do
|
do
|
||||||
local mt = mt(function(t) tmp[t] = true; return t end)
|
local mt = mt(function(t) tmp[t] = true; return t end)
|
||||||
public.temp
|
public.temp
|
||||||
{
|
{
|
||||||
get = function() return setmetatable(table(), mt) end,
|
get = function() return setmetatable(table(), mt) end,
|
||||||
set = function(t) tmp[t] = true end,
|
set = function(t) tmp[t] = true end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local mt = mt(function(t) tmp[t] = nil; return t end)
|
local mt = mt(function(t) tmp[t] = nil; return t end)
|
||||||
public.perm
|
public.perm
|
||||||
{
|
{
|
||||||
get = function() return setmetatable(table(), mt) end,
|
get = function() return setmetatable(table(), mt) end,
|
||||||
set = function(t) tmp[t] = nil end,
|
set = function(t) tmp[t] = nil end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user