summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/option.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-03 13:53:44 +0800
committerruki <[email protected]>2015-06-03 13:53:44 +0800
commitbcb0d8e7eb53865f627cadd79eb181de34e86f5a (patch)
treeca0300e883af6093b54985e797311d820da68d4c /xmake/scripts/base/option.lua
parent6ba8d0eb8d09d5170242837ef091c04ab4da6047 (diff)
uses table.insert
Diffstat (limited to 'xmake/scripts/base/option.lua')
-rw-r--r--xmake/scripts/base/option.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/scripts/base/option.lua b/xmake/scripts/base/option.lua
index 5393e0f9b..df1fb54cb 100644
--- a/xmake/scripts/base/option.lua
+++ b/xmake/scripts/base/option.lua
@@ -44,11 +44,11 @@ function option._save_menu(menu)
local _options = option()
if _options then
for _, o in ipairs(_options) do
- options_all[table.getn(options_all) + 1] = o
+ table.insert(options_all, o)
end
end
else
- options_all[table.getn(options_all) + 1] = option
+ table.insert(options_all, option)
end
end
@@ -281,7 +281,7 @@ function option.init(argv, menu)
end
-- append value
- o[table.getn(o) + 1] = key
+ table.insert(o, key)
end
else
-- invalid option