convert one more factory template

This commit is contained in:
Axel Kohlmeyer
2022-02-11 18:38:36 -05:00
parent 6a0e93a18a
commit df02598fc1
2 changed files with 9 additions and 13 deletions

View File

@ -57,6 +57,15 @@ using namespace LAMMPS_NS;
#define DELTALINE 256
#define DELTA 4
/* ----------------------------------------------------------------------
one instance per command in style_command.h
------------------------------------------------------------------------- */
template <typename T> static Command *command_creator(LAMMPS *lmp)
{
return new T(lmp);
}
/* ---------------------------------------------------------------------- */
/** \class LAMMPS_NS::Input
@ -810,16 +819,6 @@ int Input::execute_command()
return -1;
}
/* ----------------------------------------------------------------------
one instance per command in style_command.h
------------------------------------------------------------------------- */
template <typename T>
Command *Input::command_creator(LAMMPS *lmp)
{
return new T(lmp);
}
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */