add and use Neighbor::modify_params() convenience function
This commit is contained in:
@ -2356,6 +2356,22 @@ void Neighbor::modify_params(int narg, char **arg)
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
convenience function to allow modifying parameters from a single string
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::modify_params(const std::string &modcmd)
|
||||
{
|
||||
auto args = utils::split_words(modcmd);
|
||||
char **newarg = new char*[args.size()];
|
||||
int i=0;
|
||||
for (const auto &arg : args) {
|
||||
newarg[i++] = (char *)arg.c_str();
|
||||
}
|
||||
modify_params(args.size(),newarg);
|
||||
delete[] newarg;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
remove the first group-group exclusion matching group1, group2
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user