summaryrefslogtreecommitdiff
path: root/xmake/core/base/table.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/table.lua')
-rw-r--r--xmake/core/base/table.lua15
1 files changed, 4 insertions, 11 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 9af47b5a8..3fc5d92c8 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -258,17 +258,10 @@ function table.unique(array, barrier)
end
-- add unique item
- if type(v) == "string" then
- if not exists[v] then
- exists[v] = true
- table.insert(unique, v)
- end
- else
- local key = "\"" .. tostring(v) .. "\""
- if not exists[key] then
- exists[key] = true
- table.insert(unique, v)
- end
+ if not exists[v] then
+ -- v will not be nil
+ exists[v] = true
+ table.insert(unique, v)
end
end