silence compiler warning

This commit is contained in:
Axel Kohlmeyer
2023-05-30 19:10:11 -04:00
parent 5fac8f483e
commit 9ec55dcb1f

View File

@ -4068,12 +4068,16 @@ int Variable::special_function(char *word, char *contents, Tree **tree, Tree **t
std::string contents_copy(contents);
auto pos = contents_copy.find_first_of(',');
if (pos == std::string::npos)
if (strcmp(word,"label2type") == 0)
if (pos == std::string::npos) {
if (strcmp(word,"label2type") == 0) {
print_var_error(FLERR, fmt::format("Invalid label2type({}) function in variable formula",
contents_copy), ivar);
else print_var_error(FLERR, fmt::format("Invalid is_typelabel({}) function in variable formula",
contents_copy), ivar);
} else {
print_var_error(FLERR, fmt::format("Invalid is_typelabel({}) function in variable formula",
contents_copy), ivar);
}
}
std::string typestr = contents_copy.substr(pos+1);
std::string kind = contents_copy.substr(0, pos);