T2345: Replace instances of NULL with nullptr
The following changes have been applied to src and lib folders: regex replace: ([^"_])NULL ⇒ \1nullptr (8968 chgs in src, 1153 in lib) Manually find/change: (void \*) nullptr ⇒ nullptr (1 case) regex find: ".*?nullptr.*?" Manually ~14 cases back to "NULL" in src, ~2 in lib regex finds a few false positive where nullptr appears between two strings in a function call
This commit is contained in:
@ -38,7 +38,7 @@ enum{NOHYPER,GLOBAL,LOCAL};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Hyper::Hyper(LAMMPS *lmp) : Pointers(lmp), dumplist(NULL) {}
|
||||
Hyper::Hyper(LAMMPS *lmp) : Pointers(lmp), dumplist(nullptr) {}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
perform hyperdynamics simulation
|
||||
@ -91,7 +91,7 @@ void Hyper::command(int narg, char **arg)
|
||||
fix_hyper = (FixHyper *) modify->fix[ifix];
|
||||
int dim;
|
||||
int *hyperflag = (int *) fix_hyper->extract("hyperflag",dim);
|
||||
if (hyperflag == NULL || *hyperflag == 0)
|
||||
if (hyperflag == nullptr || *hyperflag == 0)
|
||||
error->all(FLERR,"Hyper fix is not a valid hyperdynamics fix");
|
||||
if (*hyperflag == 1) hyperstyle = GLOBAL;
|
||||
if (*hyperflag == 2) hyperstyle = LOCAL;
|
||||
@ -353,7 +353,7 @@ void Hyper::command(int narg, char **arg)
|
||||
delete finish;
|
||||
modify->delete_fix("hyper_event");
|
||||
|
||||
compute_event->reset_extra_compute_fix(NULL);
|
||||
compute_event->reset_extra_compute_fix(nullptr);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -449,7 +449,7 @@ void Hyper::options(int narg, char **arg)
|
||||
maxeval = 50;
|
||||
dumpflag = 0;
|
||||
ndump = 0;
|
||||
dumplist = NULL;
|
||||
dumplist = nullptr;
|
||||
rebond = 0;
|
||||
|
||||
int iarg = 0;
|
||||
|
||||
Reference in New Issue
Block a user