diff options
| author | ruki <[email protected]> | 2020-03-17 23:17:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-17 13:46:16 +0800 |
| commit | d32578f6b5c788e31e08a6705e4b884626dafd75 (patch) | |
| tree | 98a388af9d6ee5b0fefab94d4db6df468badaa59 /xmake/core/base | |
| parent | 0924c3f19f63006333f05dbf83f6f152d8a1c920 (diff) | |
fix jobpool deps
Diffstat (limited to 'xmake/core/base')
| -rw-r--r-- | xmake/core/base/hashset.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/base/hashset.lua b/xmake/core/base/hashset.lua index a30bd69f7..6cd94ceba 100644 --- a/xmake/core/base/hashset.lua +++ b/xmake/core/base/hashset.lua @@ -100,7 +100,7 @@ end -- convert hashset to an array, nil in the set will be ignored function hashset_impl:to_array() local result = {} - for k,_ in pairs(self._DATA) do + for k, _ in pairs(self._DATA) do if k ~= hashset._NIL then table.insert(result, k) end @@ -126,6 +126,11 @@ function hashset_impl:size() return self._SIZE end +-- is empty? +function hashset_impl:empty() + return self:size() == 0 +end + -- get data of hashset function hashset_impl:data() return self._DATA |
