diff --git a/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua b/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua index 4f6adfe..3d85c6f 100644 --- a/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua +++ b/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua @@ -98,7 +98,7 @@ local function safecall(func, ...) -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[getn(arg)](func, unpack(arg)) + return Dispatchers[arg.n](func, unpack(arg)) end end @@ -203,7 +203,7 @@ end -- @param addon addon object to embed the libs in -- @param lib List of libraries to embed into the addon function AceAddon:EmbedLibraries(addon, ...) - for i=1,getn(arg) do + for i=1,arg.n do local libname = arg[i] self:EmbedLibrary(addon, libname, false, 4) end diff --git a/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua b/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua index 2fa54dc..3288bbf 100644 --- a/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua +++ b/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua @@ -21,7 +21,7 @@ AceConsole.commands = AceConsole.commands or {} -- table containing commands reg AceConsole.weakcommands = AceConsole.weakcommands or {} -- table containing self, command => func references for weak commands that don't persist through enable/disable -- Lua APIs -local tconcat, getn, tostring = table.concat, table.getn, tostring +local tconcat, tostring = table.concat, tostring local type, pairs, error = type, pairs, error local format, strfind, strsub, upper, lower = string.format, string.find, string.sub, string.upper, string.lower local max = math.max @@ -40,7 +40,7 @@ local function Print(self,frame,...) n=n+1 tmp[n] = "|cff33ff99"..tostring( self ).."|r:" end - for i=1, getn(arg) do + for i=1, arg.n do n=n+1 tmp[n] = tostring(arg[i]) end diff --git a/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua b/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua index 97e6c6a..b76d031 100644 --- a/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua +++ b/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua @@ -21,7 +21,7 @@ local strbyte, strchar, gsub, gmatch, format = string.byte, string.char, string. local assert, error, pcall = assert, error, pcall local type, tostring, tonumber = type, tostring, tonumber local pairs, frexp = pairs, math.frexp -local tconcat, getn = table.concat, table.getn +local tconcat = table.concat -- quick copies of string representations of wonky numbers local serNaN = tostring(0/0) @@ -116,7 +116,7 @@ local serializeTbl = { "^1" } -- "^1" = Hi, I'm data serialized by AceSerializer function AceSerializer:Serialize(...) local nres = 1 - for i=1,getn(arg) do + for i=1,arg.n do local v = arg[i] nres = SerializeValue(v, serializeTbl, nres) end diff --git a/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua b/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua index e8173d8..acb8f59 100644 --- a/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua +++ b/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua @@ -52,7 +52,7 @@ local setmetatable, rawset, rawget = setmetatable, rawset, rawget local pairs, type, next, tostring, unpack = pairs, type, next, tostring, unpack local gsub = string.gsub local floor, max, min, fmod = math.floor, math.max, math.min, math.fmod -local tconcat, getn = table.concat, table.getn +local tconcat = table.concat -- WoW APIs local GetTime = GetTime @@ -126,7 +126,7 @@ Dispatchers[0] = function(func) end local function safecall(func, ...) - return Dispatchers[getn(arg)](func, unpack(arg)) + return Dispatchers[arg.n](func, unpack(arg)) end local lastint = floor(GetTime() * HZ) diff --git a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua index 8b119e6..8a24a3e 100644 --- a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua +++ b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua @@ -66,7 +66,7 @@ local funcmsg = "expected function or member name" -- pickfirstset() - picks the first non-nil value and returns it local function pickfirstset(...) - for i=1,getn(arg) do + for i=1,arg.n do if arg[i]~=nil then return arg[i] end @@ -124,7 +124,7 @@ local function callfunction(info, tab, methodtype, ...) info.type = tab.type if type(method)=="function" then - if getn(arg) > 0 then + if arg.n > 0 then return method(info, unpack(arg)) else return method(info) diff --git a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua index 09dcef0..a8e66e3 100644 --- a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua +++ b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @@ -77,7 +77,7 @@ Dispatchers[0] = function(func) end local function safecall(func, ...) - return Dispatchers[getn(arg)](func, unpack(arg)) + return Dispatchers[arg.n](func, unpack(arg)) end local width_multiplier = 170 @@ -140,7 +140,7 @@ end -- picks the first non-nil value and returns it local function pickfirstset(...) - for i=1,getn(arg) do + for i=1,arg.n do if arg[i]~=nil then return arg[i] end @@ -483,7 +483,7 @@ function AceConfigDialog:SelectGroup(appName, ...) local treevalue local treestatus - for n = 1, getn(arg) do + for n = 1, arg.n do local key = arg[n] if group.childGroups == "tab" or group.childGroups == "select" then @@ -600,7 +600,7 @@ local function confirmPopup(appName, rootframe, basepath, info, message, func, . AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl)) del(info) end - local x = getn(arg) + local x = arg.n for i = 1, x do t[i] = arg[i] or false end @@ -1442,7 +1442,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin end local function BuildPath(path, ...) - for i = 1, getn(arg) do + for i = 1, arg.n do tinsert(path, arg[i]) end end @@ -1849,7 +1849,7 @@ function AceConfigDialog:Open(appName, container, ...) tinsert(path, container) container = nil end - for n = 1, getn(arg) do + for n = 1, arg.n do tinsert(path, arg[n]) end @@ -1959,7 +1959,7 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...) local BlizOptions = AceConfigDialog.BlizOptions local key = appName - for n = 1, getn(arg) do + for n = 1, arg.n do key = key.."\001"..arg[n] end @@ -1974,9 +1974,9 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...) group:SetTitle(name or appName) group:SetUserData("appName", appName) - if getn(arg) > 0 then + if arg.n > 0 then local path = {} - for n = 1, getn(arg) do + for n = 1, arg.n do tinsert(path, arg[n]) end group:SetUserData("path", path) diff --git a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua index ebf750e..bf048ea 100644 --- a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua +++ b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua @@ -23,7 +23,7 @@ if not AceConfigRegistry.callbacks then end -- Lua APIs -local tinsert, tconcat, getn = table.insert, table.concat, table.getn +local tinsert, tconcat = table.insert, table.concat local strfind, strmatch = string.find, string.match local type, tostring, pairs, unpack = type, tostring, pairs, unpack local error, assert = error, assert @@ -44,7 +44,7 @@ AceConfigRegistry.validated = { local function err(msg, errlvl, ...) local t = {} - for i=getn(arg),1,-1 do + for i=arg.n,1,-1 do tinsert(t, arg[i]) end error(MAJOR..":ValidateOptionsTable(): "..tconcat(t,".")..msg, errlvl+2) diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua b/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua index a7dce04..041a67c 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua @@ -99,7 +99,7 @@ Dispatchers[0] = function(func) end local function safecall(func, ...) - return Dispatchers[getn(arg)](func, unpack(arg)) + return Dispatchers[arg.n](func, unpack(arg)) end -- Recycling functions @@ -477,7 +477,7 @@ do end WidgetContainerBase.AddChildren = function(self, ...) - for i = 1, getn(arg) do + for i = 1, arg.n do local child = arg[i] tinsert(self.children, child) child:SetParent(self) diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua index 6811d53..b5780af 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @@ -167,7 +167,7 @@ local function FirstFrameUpdate() end local function BuildUniqueValue(...) - return tconcat(arg, "\001", 1, getn(arg)) + return tconcat(arg, "\001", 1, arg.n) end --[[----------------------------------------------------------------------------- @@ -539,7 +539,7 @@ local methods = { self.filter = false local status = self.status or self.localstatus local groups = status.groups - for i = 1, getn(arg) do + for i = 1, arg.n do groups[tconcat(arg, "\001", 1, i)] = true end status.selected = uniquevalue diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua index fdca709..fb0cee6 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua @@ -8,7 +8,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local pairs = pairs local unpack = unpack -local getn = table.getn -- WoW APIs local PlaySound = PlaySound @@ -228,7 +227,7 @@ local methods = { image:SetTexture(path) if image:GetTexture() then - local n = getn(arg) + local n = arg.n if n == 4 or n == 8 then image:SetTexCoord(unpack(arg)) else diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua index 7604283..bff5765 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua @@ -4,7 +4,6 @@ local AceGUI = LibStub("AceGUI-3.0") -- Lua APIs local assert, unpack = assert, unpack -local getn = table.getn -- WoW APIs local PlaySound = PlaySound @@ -14,7 +13,7 @@ local function fixlevels(parent, ...) local child local level = parent:GetFrameLevel() + 1 - for i = 1, getn(arg) do + for i = 1, arg.n do child = arg[i] child:SetFrameLevel(level) fixlevels(child) @@ -25,7 +24,7 @@ local function fixstrata(strata, parent, ...) local child parent:SetFrameStrata(strata) - for i = 1, getn(arg) do + for i = 1, arg.n do child = arg[i] fixstrata(strata, child) end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua index 79f8c82..81e36e6 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua @@ -20,7 +20,7 @@ local function fixlevels(parent, ...) local child local level = parent:GetFrameLevel() + 1 - for i = 1, getn(arg) do + for i = 1, arg.n do child = arg[i] child:SetFrameLevel(level) fixlevels(child) @@ -31,7 +31,7 @@ local function fixstrata(strata, parent, ...) local child parent:SetFrameStrata(strata) - for i = 1, getn(arg) do + for i = 1, arg.n do child = arg[i] fixstrata(strata, child) end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua index 17b522e..2828662 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua @@ -7,7 +7,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local pairs, print, unpack = pairs, print, unpack -local getn = table.getn -- WoW APIs local CreateFrame, UIParent = CreateFrame, UIParent @@ -59,7 +58,7 @@ local methods = { image:SetTexture(path) if image:GetTexture() then - local n = getn(arg) + local n = arg.n if n == 4 or n == 8 then image:SetTexCoord(unpack(arg)) else diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua index 3350b90..bd46675 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua @@ -7,7 +7,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local pairs, unpack = pairs, unpack -local getn = table.getn -- WoW APIs local CreateFrame, UIParent = CreateFrame, UIParent @@ -50,7 +49,7 @@ local methods = { end, ["SetHighlightTexCoord"] = function(self, ...) - local c = getn(arg) + local c = arg.n if c == 4 or c == 8 then self.highlight:SetTexCoord(unpack(arg)) else diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Label.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Label.lua index bfd9da7..beab82c 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Label.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-Label.lua @@ -8,7 +8,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local max, pairs, unpack = math.max, pairs, unpack -local getn = table.getn -- WoW APIs local CreateFrame, UIParent = CreateFrame, UIParent @@ -112,7 +111,7 @@ local methods = { if image:GetTexture() then self.imageshown = true - local n = getn(arg) + local n = arg.n if n == 4 or n == 8 then image:SetTexCoord(unpack(arg)) else