make calls to virtual functions from constructors explicit

This commit is contained in:
Axel Kohlmeyer
2021-08-13 05:50:44 -04:00
parent 0928c912c0
commit 3e99e24f41
6 changed files with 8 additions and 13 deletions

View File

@ -29,7 +29,7 @@ enum { MASSCENTER, GEOMCENTER };
ComputeDipole::ComputeDipole(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg)
{
if (narg != 3) error->all(FLERR, "Illegal compute com command");
if ((narg < 3) || (narg > 4)) error->all(FLERR, "Illegal compute dipole command");
scalar_flag = 1;
vector_flag = 1;
@ -39,11 +39,8 @@ ComputeDipole::ComputeDipole(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, n
vector = new double[size_vector];
vector[0] = vector[1] = vector[2] = 0.0;
usecenter = MASSCENTER;
if ((narg != 3) && (narg != 4)) error->all(FLERR, "Illegal compute dipole command");
if (narg == 4) {
if (utils::strmatch(arg[3], "^geom"))
usecenter = GEOMCENTER;