diff options
| author | Opportunity <[email protected]> | 2020-01-18 19:52:01 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-01-19 13:01:08 +0800 |
| commit | faca684d1ec62de7bc3e56224c986ab24533f4fa (patch) | |
| tree | 93703488961974b15a8e61e6c19a3c2423010ee3 /xmake/core/base/option.lua | |
| parent | 1ba3e7c62e0f64b95923c2a41249ec956c436871 (diff) | |
use table.new
Diffstat (limited to 'xmake/core/base/option.lua')
| -rw-r--r-- | xmake/core/base/option.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua index 9d6853baa..e03c4dc1d 100644 --- a/xmake/core/base/option.lua +++ b/xmake/core/base/option.lua @@ -760,13 +760,14 @@ function option.show_options(options, taskname) end -- get description - local description = table.move(opt, 5, table.maxn(opt), 1, {}) + local optdespn = table.maxn(opt) + local description = table.move(opt, 5, optdespn, 1, table.new(optdespn - 5 + 1, 0)) if #description == 0 then description[1] = "" end -- transform description - local desp_strs = {} + local desp_strs = table.new(#description, 0) for _, v in ipairs(description) do if type(v) == "function" then v = v() |
