summaryrefslogtreecommitdiff
path: root/xmake/core/base/table.lua
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-17 16:36:12 +0800
committerOpportunityLiu <[email protected]>2019-07-19 11:48:32 +0800
commit482dfde9fd5cfa7ca02d70d76baf4b3a25f1d2b1 (patch)
tree2e7009c6149d2fec6141b1b7db8b95cfd2d161b6 /xmake/core/base/table.lua
parent8a976c88c7b9da0a306fbbeac22870a7b00b4682 (diff)
add values from opts and packages
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