summaryrefslogtreecommitdiff
path: root/src/commands.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-03-06 14:12:56 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-03-06 14:27:00 +0100
commit0e2ba188dc1bfefa0bd7e064aa7d67d7ea0784a7 (patch)
treebda406dc82ebf78777cef65ad64276c281782bc2 /src/commands.cc
parent3e7344fb14060931a6a6cd13b367ce13adbe6b37 (diff)
Add support for int list options, specified using a comma seperated list of int
Diffstat (limited to 'src/commands.cc')
-rw-r--r--src/commands.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 6dce3986..fc315fd3 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -479,6 +479,8 @@ void declare_option(const CommandParameters& params, Context& context)
opt = &GlobalOptions::instance().declare_option<int>(params[1], 0);
else if (params[0] == "str")
opt = &GlobalOptions::instance().declare_option<String>(params[1], "");
+ else if (params[0] == "int-list")
+ opt = &GlobalOptions::instance().declare_option<std::vector<int>>(params[1], {});
else
throw runtime_error("unknown type " + params[0]);