mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Faster insertion into table
This commit is contained in:
parent
75db0543f3
commit
24e8b0ac1e
13 changed files with 48 additions and 45 deletions
|
@ -20,7 +20,7 @@ function core.privs_to_string(privs, delim)
|
|||
local list = {}
|
||||
for priv, bool in pairs(privs) do
|
||||
if bool then
|
||||
table.insert(list, priv)
|
||||
list[#list + 1] = priv
|
||||
end
|
||||
end
|
||||
return table.concat(list, delim)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue