remove duplicate

This commit is contained in:
Yaser Afshar
2021-11-29 07:56:10 -06:00
parent 7559cc0536
commit 0894bc2682

View File

@ -109,14 +109,9 @@ void LabelMap::modify_lmap(int narg, char **arg)
if (search(slabel,(*labels_map)) != -1)
error->all(FLERR,"Type label already exists: types labels must be unique");
std::string &str = (*labels)[itype-1];
if (str.empty()) {
str = slabel;
(*labels_map)[slabel] = itype;
} else {
(*labels_map).erase(str);
str = slabel;
(*labels_map)[slabel] = itype;
}
if (!str.empty()) (*labels_map).erase(str);
str = slabel;
(*labels_map)[slabel] = itype;
}
}