refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-23 06:58:10 +02:00
parent 5319e00a0a
commit c2f7311349
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -30,7 +30,7 @@ function importer_mt.__call(self, arg1, arg2)
return self
end
function set_property(metadata, data, modifier, key, f)
if key and not data[key] and type(f) == 'function' or property_error() then
if key and not data[key] and (type(f) == 'function' or property_error()) then
metadata[key] = metadata[key] + modifier
data[key] = f
end
@@ -68,7 +68,6 @@ do
local function index(access, default)
return function(self, key)
local state = _state[self]; local modifiers = state.metadata[key] or 0
if key == 'perm' then DEFAULT_CHAT_FRAME:AddMessage(tostring(key)) end
if mask(access+ACCESSOR, modifiers) == access+ACCESSOR then return state.accessors[key]() end
return state.data[key] or default[key]
end