“var_model” statement: make “eqtags” option mandatory

var-models
Sébastien Villemot 2021-07-07 18:35:15 +02:00
parent 67f4777ac3
commit f7a367d7b1
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 3 deletions

View File

@ -1386,10 +1386,10 @@ ParsingDriver::var_model()
error("You must pass the model_name option to the var_model statement.");
auto name = its->second;
vector<string> eqtags;
auto itvs = options_list.vector_str_options.find("var.eqtags");
if (itvs != options_list.vector_str_options.end())
eqtags = itvs->second;
if (itvs == options_list.vector_str_options.end())
error("You must pass the eqtags option to the var_model statement.");
auto eqtags = itvs->second;
mod_file->var_model_table.addVarModel(name, eqtags);
options_list.clear();