mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
cleanup
This commit is contained in:
@@ -32,14 +32,14 @@ function select(n, ...)
|
||||
end
|
||||
|
||||
if n == "#" then
|
||||
return getn(arg)
|
||||
return arg.n
|
||||
elseif n == 1 then
|
||||
return unpack(arg)
|
||||
end
|
||||
|
||||
local args = {}
|
||||
|
||||
for i = n, getn(arg) do
|
||||
for i = n, arg.n do
|
||||
args[i-n+1] = arg[i]
|
||||
end
|
||||
|
||||
@@ -182,7 +182,7 @@ function string.join(delimiter, ...)
|
||||
error(format("bad argument #1 to 'join' (string expected, got %s)", delimiter and type(delimiter) or "no value"), 2)
|
||||
end
|
||||
|
||||
if getn(arg) == 0 then
|
||||
if arg.n == 0 then
|
||||
return ""
|
||||
end
|
||||
|
||||
@@ -339,27 +339,27 @@ wipe = table.wipe
|
||||
|
||||
local LOCAL_ToStringAllTemp = {}
|
||||
function tostringall(...)
|
||||
local n = getn(arg)
|
||||
local n = arg.n
|
||||
-- Simple versions for common argument counts
|
||||
if (n == 1) then
|
||||
if n == 1 then
|
||||
return tostring(arg[1])
|
||||
elseif (n == 2) then
|
||||
elseif n == 2 then
|
||||
return tostring(arg[1]), tostring(arg[2])
|
||||
elseif (n == 3) then
|
||||
elseif n == 3 then
|
||||
return tostring(arg[1]), tostring(arg[2]), tostring(arg[3])
|
||||
elseif (n == 0) then
|
||||
elseif n == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local needfix
|
||||
for i = 1, n do
|
||||
local v = arg[i]
|
||||
if (type(v) ~= "string") then
|
||||
if type(v) ~= "string" then
|
||||
needfix = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not needfix) then return unpack(arg) end
|
||||
if not needfix then return unpack(arg) end
|
||||
|
||||
wipe(LOCAL_ToStringAllTemp)
|
||||
for i = 1, needfix - 1 do
|
||||
@@ -377,7 +377,7 @@ local LOCAL_PrintHandler = function(...)
|
||||
end
|
||||
|
||||
function setprinthandler(func)
|
||||
if (type(func) ~= "function") then
|
||||
if type(func) ~= "function" then
|
||||
error("Invalid print handler")
|
||||
else
|
||||
LOCAL_PrintHandler = func
|
||||
@@ -388,7 +388,7 @@ function getprinthandler() return LOCAL_PrintHandler end
|
||||
|
||||
local function print_inner(...)
|
||||
local ok, err = pcall(LOCAL_PrintHandler, unpack(arg))
|
||||
if (not ok) then
|
||||
if not ok then
|
||||
local func = geterrorhandler()
|
||||
func(err)
|
||||
end
|
||||
|
||||
@@ -106,7 +106,7 @@ function EventTraceFrame_OnEvent(self, event, ...)
|
||||
self.framesSinceLast[nextIndex] = 0
|
||||
self.eventids[nextIndex] = GetCurrentEventID()
|
||||
|
||||
local numArgs = getn(arg)
|
||||
local numArgs = arg.n
|
||||
for i = 1, numArgs do
|
||||
if not self.args[i] then
|
||||
self.args[i] = {}
|
||||
|
||||
@@ -85,7 +85,7 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll
|
||||
local oldrecurse = registry.recurse
|
||||
registry.recurse = oldrecurse + 1
|
||||
|
||||
Dispatchers[getn(arg) + 1](events[eventname], eventname, unpack(arg))
|
||||
Dispatchers[arg.n + 1](events[eventname], eventname, unpack(arg))
|
||||
|
||||
registry.recurse = oldrecurse
|
||||
|
||||
@@ -136,7 +136,7 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll
|
||||
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
|
||||
end
|
||||
|
||||
if getn(arg)>=1 then -- this is not the same as testing for arg==nil!
|
||||
if arg.n >= 1 then -- this is not the same as testing for arg==nil!
|
||||
regfunc = function(...) self[method](self,arg1,unpack(arg)) end
|
||||
else
|
||||
regfunc = function(...) self[method](self,unpack(arg)) end
|
||||
@@ -147,7 +147,7 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll
|
||||
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
|
||||
end
|
||||
|
||||
if getn(arg)>=1 then -- this is not the same as testing for arg==nil!
|
||||
if arg.n >= 1 then -- this is not the same as testing for arg==nil!
|
||||
regfunc = function(...) method(arg1,unpack(arg)) end
|
||||
else
|
||||
regfunc = method
|
||||
@@ -202,7 +202,7 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll
|
||||
end
|
||||
|
||||
|
||||
for i=1,getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
local self = arg[i]
|
||||
if registry.insertQueue then
|
||||
for eventname, callbacks in pairs(registry.insertQueue) do
|
||||
|
||||
@@ -81,7 +81,7 @@ local function setCleanupTables(...)
|
||||
if not LibCompress.frame:IsShown() then
|
||||
LibCompress.frame:Show()
|
||||
end
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
tables_to_clean[(select(i, unpack(arg)))] = true
|
||||
end
|
||||
end
|
||||
@@ -1011,7 +1011,7 @@ function LibCompress:GetChatEncodeTable(reservedChars, escapeChars, mapChars)
|
||||
-- Also, because drunken status is unknown for the received, strings used with SendChatMessage should be terminated with
|
||||
-- an identifying byte value, after which the server MAY add "...hic!" or as much as it can fit(!).
|
||||
-- Pass the identifying byte as a reserved character to this function to ensure the encoding doesn't contain that value.
|
||||
-- or use this: local message, match = arg1:gsub("^(.*)\029.-$", "%1")
|
||||
-- or use this: local message, match = gsub(arg1, "^(.*)\029.-$", "%1")
|
||||
-- arg1 is message from channel, \029 is the string terminator, but may be used in the encoded datastream as well. :-)
|
||||
-- This encoding will expand data anywhere from:
|
||||
-- 0% (average with pure ascii text)
|
||||
|
||||
+69
-70
@@ -41,29 +41,29 @@ local function updateActiveUnit(self, event, unit)
|
||||
end
|
||||
|
||||
local function iterateChildren(...)
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
local obj = arg[i]
|
||||
|
||||
if(type(obj) == "table" and obj.isChild) then
|
||||
if type(obj) == "table" and obj.isChild then
|
||||
updateActiveUnit(obj, "iterateChildren")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function onAttributeChanged(self, name, value)
|
||||
if(name == "unit" and value) then
|
||||
if(self.hasChildren) then
|
||||
if name == "unit" and value then
|
||||
if self.hasChildren then
|
||||
iterateChildren(self:GetChildren())
|
||||
end
|
||||
|
||||
if(not self.onlyProcessChildren) then
|
||||
if not self.onlyProcessChildren then
|
||||
updateActiveUnit(self, "OnAttributeChanged")
|
||||
end
|
||||
|
||||
if(self.unit and self.unit == value) then
|
||||
if self.unit and self.unit == value then
|
||||
return
|
||||
else
|
||||
if(self.hasChildren) then
|
||||
if self.hasChildren then
|
||||
iterateChildren(self:GetChildren())
|
||||
end
|
||||
end
|
||||
@@ -79,22 +79,22 @@ Private.frame_metatable = frame_metatable
|
||||
for k, v in next, {
|
||||
UpdateElement = function(self, name)
|
||||
local unit = self.unit
|
||||
if(not unit or not UnitExists(unit)) then return end
|
||||
if not unit or not UnitExists(unit) then return end
|
||||
|
||||
local element = elements[name]
|
||||
if(not element or not self:IsElementEnabled(name) or not activeElements[self]) then return end
|
||||
if(element.update) then
|
||||
if not element or not self:IsElementEnabled(name) or not activeElements[self] then return end
|
||||
if element.update then
|
||||
element.update(self, "OnShow", unit)
|
||||
end
|
||||
end,
|
||||
|
||||
UpdateElement = function(self, name)
|
||||
local unit = self.unit
|
||||
if(not unit or not UnitExists(unit)) then return end
|
||||
if not unit or not UnitExists(unit) then return end
|
||||
|
||||
local element = elements[name]
|
||||
if(not element or not self:IsElementEnabled(name) or not activeElements[self]) then return end
|
||||
if(element.update) then
|
||||
if not element or not self:IsElementEnabled(name) or not activeElements[self] then return end
|
||||
if element.update then
|
||||
element.update(self, "OnShow", unit)
|
||||
end
|
||||
end,
|
||||
@@ -114,12 +114,12 @@ for k, v in next, {
|
||||
argcheck(unit or self.unit, 3, "string", "nil")
|
||||
|
||||
local element = elements[name]
|
||||
if(not element or self:IsElementEnabled(name) or not activeElements[self]) then return end
|
||||
if not element or self:IsElementEnabled(name) or not activeElements[self] then return end
|
||||
|
||||
if(element.enable(self, unit or self.unit)) then
|
||||
if element.enable(self, unit or self.unit) then
|
||||
activeElements[self][name] = true
|
||||
|
||||
if(element.update) then
|
||||
if element.update then
|
||||
insert(self.__elements, element.update)
|
||||
end
|
||||
end
|
||||
@@ -135,11 +135,11 @@ for k, v in next, {
|
||||
argcheck(name, 2, "string")
|
||||
|
||||
local enabled = self:IsElementEnabled(name)
|
||||
if(not enabled) then return end
|
||||
if not enabled then return end
|
||||
|
||||
local update = elements[name].update
|
||||
for k, func in next, self.__elements do
|
||||
if(func == update) then
|
||||
if func == update then
|
||||
remove(self.__elements, k)
|
||||
break
|
||||
end
|
||||
@@ -166,7 +166,7 @@ for k, v in next, {
|
||||
argcheck(name, 2, "string")
|
||||
|
||||
local element = elements[name]
|
||||
if(not element) then return end
|
||||
if not element then return end
|
||||
|
||||
local active = activeElements[self]
|
||||
return active and active[name]
|
||||
@@ -199,11 +199,11 @@ for k, v in next, {
|
||||
--]]
|
||||
UpdateAllElements = function(self, event)
|
||||
local unit = self.unit
|
||||
if(not UnitExists(unit)) then return end
|
||||
if not UnitExists(unit) then return end
|
||||
|
||||
assert(type(event) == "string", "Invalid argument 'event' in UpdateAllElements.")
|
||||
|
||||
if(self.PreUpdate) then
|
||||
if self.PreUpdate then
|
||||
self:PreUpdate(event)
|
||||
end
|
||||
|
||||
@@ -211,7 +211,7 @@ for k, v in next, {
|
||||
func(self, event, unit)
|
||||
end
|
||||
|
||||
if(self.PostUpdate) then
|
||||
if self.PostUpdate then
|
||||
self:PostUpdate(event)
|
||||
end
|
||||
end,
|
||||
@@ -228,34 +228,34 @@ end
|
||||
local secureDropdown
|
||||
local function InitializeSecureMenu()
|
||||
local unit = SecureTemplatesDropdown.unit
|
||||
if(not unit) then return end
|
||||
if not unit then return end
|
||||
|
||||
local unitType = match(unit, "^([a-z]+)[0-9]+$") or unit
|
||||
|
||||
local menu
|
||||
if(unitType == "party") then
|
||||
if unitType == "party" then
|
||||
menu = "PARTY"
|
||||
elseif(UnitIsUnit(unit, "player")) then
|
||||
elseif UnitIsUnit(unit, "player") then
|
||||
menu = "SELF"
|
||||
elseif(UnitIsUnit(unit, "pet")) then
|
||||
elseif UnitIsUnit(unit, "pet") then
|
||||
menu = "PET"
|
||||
elseif(UnitIsPlayer(unit)) then
|
||||
if(UnitInRaid(unit) or UnitInParty(unit)) then
|
||||
elseif UnitIsPlayer(unit) then
|
||||
if UnitInRaid(unit) or UnitInParty(unit) then
|
||||
menu = "PARTY"
|
||||
else
|
||||
menu = "PLAYER"
|
||||
end
|
||||
elseif(UnitIsUnit(unit, "target")) then
|
||||
elseif UnitIsUnit(unit, "target") then
|
||||
menu = "RAID_TARGET_ICON"
|
||||
end
|
||||
|
||||
if(menu) then
|
||||
if menu then
|
||||
UnitPopup_ShowMenu(SecureTemplatesDropdown, menu, unit)
|
||||
end
|
||||
end
|
||||
|
||||
local function togglemenu(self, unit)
|
||||
if(not secureDropdown) then
|
||||
if not secureDropdown then
|
||||
secureDropdown = CreateFrame("Frame", "SecureTemplatesDropdown", nil, "UIDropDownMenuTemplate")
|
||||
secureDropdown:SetID(1)
|
||||
|
||||
@@ -263,7 +263,7 @@ local function togglemenu(self, unit)
|
||||
UIDropDownMenu_Initialize(secureDropdown, InitializeSecureMenu, "MENU")
|
||||
end
|
||||
|
||||
if(secureDropdown.openedFor and secureDropdown.openedFor ~= self) then
|
||||
if secureDropdown.openedFor and secureDropdown.openedFor ~= self then
|
||||
CloseDropDownMenus()
|
||||
end
|
||||
|
||||
@@ -278,8 +278,7 @@ local function onShow(self)
|
||||
end
|
||||
|
||||
local function initObject(unit, style, styleFunc, header, ...)
|
||||
local num = getn(arg)
|
||||
for i = 1, num do
|
||||
for i = 1, arg.n do
|
||||
local object = arg[i]
|
||||
local objectUnit = object.guessUnit or unit
|
||||
local suffix = objectUnit and match(objectUnit or unit, "%w+target")
|
||||
@@ -303,9 +302,9 @@ local function initObject(unit, style, styleFunc, header, ...)
|
||||
end
|
||||
end)
|
||||
|
||||
if(not header) then
|
||||
if not header then
|
||||
-- Other target units are handled by :HandleUnit().
|
||||
if(suffix == "target") then
|
||||
if suffix == "target" then
|
||||
enableTargetUpdate(object)
|
||||
else
|
||||
oUF:HandleUnit(object, unit)
|
||||
@@ -314,7 +313,7 @@ local function initObject(unit, style, styleFunc, header, ...)
|
||||
-- Used to update frames when they change position in a group.
|
||||
object:RegisterEvent("RAID_ROSTER_UPDATE", object.UpdateAllElements)
|
||||
|
||||
if(num > 1) then
|
||||
if arg.n > 1 then
|
||||
if(object:GetParent() == header) then
|
||||
object.hasChildren = true
|
||||
else
|
||||
@@ -322,7 +321,7 @@ local function initObject(unit, style, styleFunc, header, ...)
|
||||
end
|
||||
end
|
||||
|
||||
if(suffix == "target") then
|
||||
if suffix == "target" then
|
||||
enableTargetUpdate(object)
|
||||
end
|
||||
end
|
||||
@@ -356,7 +355,7 @@ local function walkObject(object, unit)
|
||||
local header = parent.headerType and parent
|
||||
|
||||
-- Check if we should leave the main frame blank.
|
||||
if(object.onlyProcessChildren) then
|
||||
if object.onlyProcessChildren then
|
||||
object.hasChildren = true
|
||||
return initObject(unit, style, styleFunc, header, object:GetChildren())
|
||||
end
|
||||
@@ -385,7 +384,7 @@ function oUF:RegisterMetaFunction(name, func)
|
||||
argcheck(name, 2, "string")
|
||||
argcheck(func, 3, "function", "table")
|
||||
|
||||
if(frame_metatable.__index[name]) then
|
||||
if frame_metatable.__index[name] then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -403,8 +402,8 @@ function oUF:RegisterStyle(name, func)
|
||||
argcheck(name, 2, "string")
|
||||
argcheck(func, 3, "function", "table")
|
||||
|
||||
if(styles[name]) then return error("Style [%s] already registered.", name) end
|
||||
if(not style) then style = name end
|
||||
if styles[name] then return error("Style [%s] already registered.", name) end
|
||||
if not style then style = name end
|
||||
|
||||
styles[name] = func
|
||||
end
|
||||
@@ -417,7 +416,7 @@ Used to set the active style.
|
||||
--]]
|
||||
function oUF:SetActiveStyle(name)
|
||||
argcheck(name, 2, "string")
|
||||
if(not styles[name]) then return error("Style [%s] does not exist.", name) end
|
||||
if not styles[name] then return error("Style [%s] does not exist.", name) end
|
||||
|
||||
style = name
|
||||
end
|
||||
@@ -452,11 +451,11 @@ do
|
||||
function getCondition(...)
|
||||
local cond = ""
|
||||
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
local short = select(i, unpack(arg))
|
||||
|
||||
local condition = conditions[short]
|
||||
if(condition) then
|
||||
if condition then
|
||||
cond = cond .. condition
|
||||
end
|
||||
end
|
||||
@@ -469,29 +468,29 @@ local function generateName(unit, ...)
|
||||
local name = "oUF_" .. gsub(style, gsub("^oUF_?", ""), gsub("[^%a%d_]+", ""))
|
||||
|
||||
local raid, party, groupFilter
|
||||
for i = 1, getn(arg), 2 do
|
||||
for i = 1, arg.n, 2 do
|
||||
local att, val = select(i, unpack(arg))
|
||||
if(att == "showRaid") then
|
||||
if att == "showRaid" then
|
||||
raid = true
|
||||
elseif(att == "showParty") then
|
||||
elseif att == "showParty" then
|
||||
party = true
|
||||
elseif(att == "groupFilter") then
|
||||
elseif att == "groupFilter" then
|
||||
groupFilter = val
|
||||
end
|
||||
end
|
||||
|
||||
local append
|
||||
if(raid) then
|
||||
if(groupFilter) then
|
||||
if(type(groupFilter) == "number" and groupFilter > 0) then
|
||||
if raid then
|
||||
if groupFilter then
|
||||
if type(groupFilter) == "number" and groupFilter > 0 then
|
||||
append = groupFilter
|
||||
elseif(match(groupFilter, "TANK")) then
|
||||
elseif match(groupFilter, "TANK") then
|
||||
append = "MainTank"
|
||||
elseif(match(groupFilter, "ASSIST")) then
|
||||
elseif match(groupFilter, "ASSIST") then
|
||||
append = "MainAssist"
|
||||
else
|
||||
local _, count = gsub(groupFilter, ",", "")
|
||||
if(count == 0) then
|
||||
if count == 0 then
|
||||
append = "Raid" .. groupFilter
|
||||
else
|
||||
append = "Raid"
|
||||
@@ -500,19 +499,19 @@ local function generateName(unit, ...)
|
||||
else
|
||||
append = "Raid"
|
||||
end
|
||||
elseif(party) then
|
||||
elseif party then
|
||||
append = "Party"
|
||||
elseif(unit) then
|
||||
elseif unit then
|
||||
append = gsub(unit, "^%l", upper)
|
||||
end
|
||||
|
||||
if(append) then
|
||||
if append then
|
||||
name = name .. append
|
||||
end
|
||||
|
||||
local base = name
|
||||
local i = 2
|
||||
while(_G[name]) do
|
||||
while _G[name] do
|
||||
name = base .. i
|
||||
i = i + 1
|
||||
end
|
||||
@@ -530,12 +529,12 @@ do
|
||||
local header = self:GetParent()
|
||||
|
||||
local unit
|
||||
if(not self.onlyProcessChildren) then
|
||||
if not self.onlyProcessChildren then
|
||||
local groupFilter = header:GetAttribute("groupFilter")
|
||||
|
||||
if(header:GetAttribute("showRaid")) then
|
||||
if header:GetAttribute("showRaid") then
|
||||
unit = "raid"
|
||||
elseif(header:GetAttribute("showParty")) then
|
||||
elseif header:GetAttribute("showParty") then
|
||||
unit = "party"
|
||||
end
|
||||
|
||||
@@ -582,7 +581,7 @@ do
|
||||
* oUF-onlyProcessChildren - can be used to force headers to only process children (boolean?)
|
||||
--]]
|
||||
function oUF:SpawnHeader(overrideName, template, visibility, ...)
|
||||
if(not style) then return error("Unable to create frame. No styles have been registered.") end
|
||||
if not style then return error("Unable to create frame. No styles have been registered.") end
|
||||
|
||||
template = (template or "oUF_GroupHeaderTemplate")
|
||||
|
||||
@@ -596,9 +595,9 @@ do
|
||||
header.GetAttribute = getAttribute
|
||||
|
||||
--header:SetAttribute("template", "SecureUnitButtonTemplate")
|
||||
for i = 1, getn(arg), 2 do
|
||||
for i = 1, arg.n, 2 do
|
||||
local att, val = select(i, unpack(arg))
|
||||
if(not att) then break end
|
||||
if not att then break end
|
||||
|
||||
header:SetAttribute(att, val)
|
||||
end
|
||||
@@ -613,14 +612,14 @@ do
|
||||
header.initialConfigFunction = initialConfigFunction
|
||||
header.headerType = isPetHeader and "pet" or "group"
|
||||
|
||||
if(header:GetAttribute("showParty")) then
|
||||
if header:GetAttribute("showParty") then
|
||||
self:DisableBlizzard("party")
|
||||
end
|
||||
|
||||
|
||||
if(visibility) then
|
||||
if visibility then
|
||||
local type, list = split(" ", visibility, 2)
|
||||
if(list and type == "custom") then
|
||||
if list and type == "custom" then
|
||||
RegisterStateDriver(header, "visibility", list)
|
||||
header.visibility = list
|
||||
else
|
||||
@@ -644,7 +643,7 @@ Used to create a single unit frame and apply the currently active style to it.
|
||||
--]]
|
||||
function oUF:Spawn(unit, overrideName)
|
||||
argcheck(unit, 2, "string")
|
||||
if(not style) then return error("Unable to create frame. No styles have been registered.") end
|
||||
if not style then return error("Unable to create frame. No styles have been registered.") end
|
||||
|
||||
unit = lower(unit)
|
||||
|
||||
@@ -677,7 +676,7 @@ function oUF:AddElement(name, update, enable, disable)
|
||||
argcheck(enable, 4, "function", "nil")
|
||||
argcheck(disable, 5, "function", "nil")
|
||||
|
||||
if(elements[name]) then return error("Element [%s] is already registered.", name) end
|
||||
if elements[name] then return error("Element [%s] is already registered.", name) end
|
||||
elements[name] = {
|
||||
update = update;
|
||||
enable = enable;
|
||||
|
||||
@@ -404,16 +404,6 @@ function S:HandleSliderFrame(frame)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[for i = 1, frame:GetNumRegions() do
|
||||
local region = select(i, frame:GetRegions())
|
||||
if region and region:GetObjectType() == "FontString" then
|
||||
local point, anchor, anchorPoint, x, y = region:GetPoint()
|
||||
if anchorPoint:find("BOTTOM") then
|
||||
E:Point(region, point, anchor, anchorPoint, x, y - 4)
|
||||
end
|
||||
end
|
||||
end]]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1926,7 +1926,7 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
||||
local BlizOptions = AceConfigDialog.BlizOptions
|
||||
|
||||
local key = appName
|
||||
local l = tgetn(arg)
|
||||
local l = arg.n
|
||||
for n = 1, l do
|
||||
key = key .. "\001" .. arg[n]
|
||||
end
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ if not AceConfigRegistry.callbacks then
|
||||
end
|
||||
|
||||
-- Lua APIs
|
||||
local tinsert, tconcat, tgetn = table.insert, table.concat, table.getn
|
||||
local tinsert, tconcat = table.insert, table.concat
|
||||
local strfind = string.find
|
||||
local type, tostring, pairs = type, tostring, pairs
|
||||
local error, assert = error, assert
|
||||
@@ -41,7 +41,7 @@ AceConfigRegistry.validated = {
|
||||
}
|
||||
|
||||
local function err(msg, errlvl, ...)
|
||||
local l = tgetn(arg)
|
||||
local l = arg.n
|
||||
local i,j = 1,l
|
||||
while i < j do
|
||||
arg[i], arg[j] = arg[j], arg[i]
|
||||
|
||||
@@ -168,7 +168,7 @@ local function FirstFrameUpdate()
|
||||
end
|
||||
|
||||
local function BuildUniqueValue(...)
|
||||
local n = tgetn(arg)
|
||||
local n = arg.n
|
||||
if n == 1 then
|
||||
return arg[1]
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user