add str-list option support to decl command

This commit is contained in:
Maxime Coste 2013-03-14 14:11:00 +01:00
parent 50d9c4dfda
commit 066876a131

View File

@ -483,6 +483,8 @@ void declare_option(const CommandParameters& params, Context& context)
opt = &GlobalOptions::instance().declare_option<String>(params[1], ""); opt = &GlobalOptions::instance().declare_option<String>(params[1], "");
else if (params[0] == "int-list") else if (params[0] == "int-list")
opt = &GlobalOptions::instance().declare_option<std::vector<int>>(params[1], {}); opt = &GlobalOptions::instance().declare_option<std::vector<int>>(params[1], {});
else if (params[0] == "str-list")
opt = &GlobalOptions::instance().declare_option<std::vector<String>>(params[1], {});
else else
throw runtime_error("unknown type " + params[0]); throw runtime_error("unknown type " + params[0]);