Optimize loveframes.util.TableHasKey

This commit is contained in:
Kenny Shields 2014-01-27 07:42:18 -05:00
parent 838ac1c85c
commit 19087a7303

View File

@ -276,13 +276,7 @@ end
--]]--------------------------------------------------------- --]]---------------------------------------------------------
function loveframes.util.TableHasKey(table, key) function loveframes.util.TableHasKey(table, key)
for k, v in pairs(table) do return table[key] ~= nil
if k == key then
return true
end
end
return false
end end