mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
table.wipe also reset array size if needed
This commit is contained in:
@@ -8,8 +8,8 @@ local tostring = tostring
|
|||||||
local type = type
|
local type = type
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local ceil, floor = math.ceil, math.floor
|
local ceil, floor = math.ceil, math.floor
|
||||||
local getn, tinsert = table.getn, table.insert
|
|
||||||
local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub
|
local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub
|
||||||
|
local getn, setn, tinsert = table.getn, table.setn, table.insert
|
||||||
|
|
||||||
math.huge = 1/0
|
math.huge = 1/0
|
||||||
string.gmatch = gfind
|
string.gmatch = gfind
|
||||||
@@ -133,6 +133,10 @@ function table.wipe(t)
|
|||||||
t[k] = nil
|
t[k] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if getn(t) ~= 0 then
|
||||||
|
setn(t, 0)
|
||||||
|
end
|
||||||
|
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
wipe = table.wipe
|
wipe = table.wipe
|
||||||
|
|||||||
Reference in New Issue
Block a user