diff options
| author | ruki <[email protected]> | 2026-03-26 22:46:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-26 22:46:59 +0800 |
| commit | 4dce664638308306dcd637d0a86808589fb617f6 (patch) | |
| tree | dbbea8c7799c1d1a3cdfe69baee49a645b8f40e7 /xmake/core/base/hashset.lua | |
| parent | 193e9a96c00a94bc26b1bcd0d15128ffd414662d (diff) | |
update more comments
Diffstat (limited to 'xmake/core/base/hashset.lua')
| -rw-r--r-- | xmake/core/base/hashset.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/core/base/hashset.lua b/xmake/core/base/hashset.lua index 3342a0e60..c052d36ee 100644 --- a/xmake/core/base/hashset.lua +++ b/xmake/core/base/hashset.lua @@ -252,6 +252,10 @@ function hashset:clone() end -- construct from list of items +-- +-- @param ... the items to insert +-- @return the new hashset +-- function hashset.of(...) local result = hashset.new() local data = table.pack(...) @@ -262,6 +266,10 @@ function hashset.of(...) end -- construct from an array +-- +-- @param array the array of items to insert +-- @return the new hashset +-- function hashset.from(array) local result = hashset.new() for i = 1, #array do @@ -270,7 +278,10 @@ function hashset.from(array) return result end --- new hashset +-- create a new empty hashset +-- +-- @return the new hashset +-- function hashset.new() return hashset {{}, 0} end |
