improve flow of control and remove redundant checks

This commit is contained in:
Axel Kohlmeyer
2022-09-03 10:40:17 -04:00
parent 2eca1eecdc
commit 2307436b76
2 changed files with 2 additions and 7 deletions

View File

@ -1626,10 +1626,7 @@ void Input::kspace_style()
void Input::labelmap()
{
if (narg < 2 || (narg % 2 == 0)) error->all(FLERR,"Illegal labelmap command");
if (domain->box_exist == 0)
error->all(FLERR,"Labelmap command before simulation box is defined");
if (domain->box_exist == 0) error->all(FLERR,"Labelmap command before simulation box is defined");
if (!atom->labelmapflag) atom->add_label_map();
atom->lmap->modify_lmap(narg,arg);
}