use symbolic constant
This commit is contained in:
@ -196,8 +196,8 @@ void Balance::command(int narg, char **arg)
|
||||
if (style != -1) error->all(FLERR,"Illegal balance command");
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal balance command");
|
||||
style = SHIFT;
|
||||
if (strlen(arg[iarg+1]) > 3) error->all(FLERR,"Illegal balance command");
|
||||
strcpy(bstr,arg[iarg+1]);
|
||||
if (strlen(arg[iarg+1]) > BSTR_SIZE) error->all(FLERR,"Illegal balance command");
|
||||
strncpy(bstr,arg[iarg+1],BSTR_SIZE);
|
||||
nitermax = utils::inumeric(FLERR,arg[iarg+2],false,lmp);
|
||||
if (nitermax <= 0) error->all(FLERR,"Illegal balance command");
|
||||
stopthresh = utils::numeric(FLERR,arg[iarg+3],false,lmp);
|
||||
|
||||
@ -56,7 +56,8 @@ class Balance : public Command {
|
||||
|
||||
int nitermax; // params for shift LB
|
||||
double stopthresh;
|
||||
char bstr[4];
|
||||
static constexpr int BSTR_SIZE = 3;
|
||||
char bstr[BSTR_SIZE+1];
|
||||
|
||||
int shift_allocate; // 1 if SHIFT vectors have been allocated
|
||||
int ndim; // length of balance string bstr
|
||||
|
||||
Reference in New Issue
Block a user