summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/util.lua
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-03-11 16:12:07 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-03-11 16:12:07 -0400
commit42de5594cd4ebde605e6f93a48a7e7c9ab60ace4 (patch)
tree44e7cdff79aacd3de6d1315d17f0c21a36562a9d /indra/newview/scripts/lua/util.lua
parent199907fa280cb3d1ea5a27dbe94e69df9256c101 (diff)
Lua already has a conventional cheap test for empty table.
Diffstat (limited to 'indra/newview/scripts/lua/util.lua')
-rw-r--r--indra/newview/scripts/lua/util.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/indra/newview/scripts/lua/util.lua b/indra/newview/scripts/lua/util.lua
index bb8d492d12..898ddc58e3 100644
--- a/indra/newview/scripts/lua/util.lua
+++ b/indra/newview/scripts/lua/util.lua
@@ -4,10 +4,7 @@ local util = {}
-- cheap test whether table t is empty
function util.empty(t)
- for _ in pairs(t) do
- return false
- end
- return true
+ return not next(t)
end
-- reliable count of the number of entries in table t