small cleanup in "deprecated" styles

This commit is contained in:
Axel Kohlmeyer
2020-07-07 13:40:15 -04:00
parent 94e9b3bc82
commit 37d56a6bf6
11 changed files with 16 additions and 28 deletions

View File

@ -24,13 +24,6 @@
using namespace LAMMPS_NS;
static void writemsg(LAMMPS *lmp, const std::string &msg, int abend=1)
{
if (lmp->comm->me == 0) utils::logmesg(lmp,msg);
if (abend)
lmp->error->all(FLERR,"This command is no longer available");
}
/* ---------------------------------------------------------------------- */
void Deprecated::command(int /* narg */, char ** /* arg */)
@ -38,8 +31,12 @@ void Deprecated::command(int /* narg */, char ** /* arg */)
const std::string cmd = input->command;
if (cmd == "DEPRECATED") {
writemsg(lmp,"\nCommand 'DEPRECATED' is a dummy command\n\n",0);
if (lmp->comm->me == 0)
utils::logmesg(lmp,"\nCommand 'DEPRECATED' is a dummy command\n\n");
return;
} else if (cmd == "reset_ids") {
writemsg(lmp,"\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n");
if (lmp->comm->me == 0)
utils::logmesg(lmp,"\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n");
}
error->all(FLERR,"This command is no longer available");
}