diff options
| author | ruki <[email protected]> | 2021-08-14 00:22:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-14 00:22:26 +0800 |
| commit | 07987f21cfa52d66080df8a2a4af5f86e608ab8e (patch) | |
| tree | 3219f02e4fdefb31cfd27fa768bbddcaf08c9058 /xmake/modules/lib/detect | |
| parent | c5f2a58cf57ad72d4e2bc39a6dc196550804d013 (diff) | |
add table.reverse_unique
Diffstat (limited to 'xmake/modules/lib/detect')
| -rw-r--r-- | xmake/modules/lib/detect/find_package.lua | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/xmake/modules/lib/detect/find_package.lua b/xmake/modules/lib/detect/find_package.lua index b38e55e39..d3c9e57d1 100644 --- a/xmake/modules/lib/detect/find_package.lua +++ b/xmake/modules/lib/detect/find_package.lua @@ -38,15 +38,7 @@ function _concat_packages(a, b) if k == "links" then if type(v) == "table" and #v > 1 then -- we need ensure link orders when removing repeat values - local v2 = {} - local map = {} - for _, _v in irpairs(v) do - if not map[_v] then - table.insert(v2, 1, _v) - map[_v] = true - end - end - v = v2 + v = table.reverse_unique(v) end else v = table.unique(v) |
