mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +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 unpack = unpack
|
||||
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 getn, setn, tinsert = table.getn, table.setn, table.insert
|
||||
|
||||
math.huge = 1/0
|
||||
string.gmatch = gfind
|
||||
@@ -133,6 +133,10 @@ function table.wipe(t)
|
||||
t[k] = nil
|
||||
end
|
||||
|
||||
if getn(t) ~= 0 then
|
||||
setn(t, 0)
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
wipe = table.wipe
|
||||
|
||||
Reference in New Issue
Block a user