use constexpr instead of define for better typechecking
This commit is contained in:
@ -29,9 +29,6 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
#define DELTA 16384
|
||||
#define DELTA_BONUS 8192
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp)
|
||||
@ -188,6 +185,8 @@ void AtomVec::init()
|
||||
error->all(FLERR,"KOKKOS package requires a kokkos enabled atom_style");
|
||||
}
|
||||
|
||||
static constexpr bigint DELTA=16384;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
roundup N so it is a multiple of DELTA
|
||||
error if N exceeds 32-bit int, since will be used as arg to grow()
|
||||
@ -211,6 +210,8 @@ void AtomVec::grow_nmax()
|
||||
nmax += DELTA;
|
||||
}
|
||||
|
||||
static constexpr bigint DELTA_BONUS=8192;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
grow nmax_bonus so it is a multiple of DELTA_BONUS
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user