remove duplicate
This commit is contained in:
@ -109,14 +109,9 @@ void LabelMap::modify_lmap(int narg, char **arg)
|
|||||||
if (search(slabel,(*labels_map)) != -1)
|
if (search(slabel,(*labels_map)) != -1)
|
||||||
error->all(FLERR,"Type label already exists: types labels must be unique");
|
error->all(FLERR,"Type label already exists: types labels must be unique");
|
||||||
std::string &str = (*labels)[itype-1];
|
std::string &str = (*labels)[itype-1];
|
||||||
if (str.empty()) {
|
if (!str.empty()) (*labels_map).erase(str);
|
||||||
str = slabel;
|
str = slabel;
|
||||||
(*labels_map)[slabel] = itype;
|
(*labels_map)[slabel] = itype;
|
||||||
} else {
|
|
||||||
(*labels_map).erase(str);
|
|
||||||
str = slabel;
|
|
||||||
(*labels_map)[slabel] = itype;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user