mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
No more warnings
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
-- luacheck:ignore global table
|
||||
|
||||
local random = math.random
|
||||
@@ -259,7 +260,7 @@ end
|
||||
-- @param x one comparator operand
|
||||
-- @param y the other comparator operand
|
||||
-- @return true if x logically comes before y in a list, false otherwise
|
||||
local function sortFunc(x, y) -- sorts tables with mixed index types.
|
||||
local function sort_func(x, y) -- sorts tables with mixed index types.
|
||||
local tx = type(x)
|
||||
local ty = type(y)
|
||||
if tx == ty then
|
||||
@@ -296,7 +297,7 @@ function table.get_values(tbl, sorted, as_string)
|
||||
end
|
||||
end
|
||||
if sorted then
|
||||
table.sort(valueset, sortFunc)
|
||||
table.sort(valueset, sort_func)
|
||||
end
|
||||
return valueset
|
||||
end
|
||||
@@ -322,7 +323,7 @@ function table.get_keys(tbl, sorted, as_string)
|
||||
end
|
||||
end
|
||||
if sorted then
|
||||
table.sort(keyset, sortFunc)
|
||||
table.sort(keyset, sort_func)
|
||||
end
|
||||
return keyset
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user