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:
Anne Gunn
2020-09-11 07:39:46 -06:00
parent 101d39142e
commit f1ef7d85a8
1217 changed files with 8531 additions and 8531 deletions

View File

@ -51,10 +51,10 @@ enum{ISO,ANISO,TRICLINIC};
FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
rfix(NULL), id_dilate(NULL), irregular(NULL), id_temp(NULL), id_press(NULL),
eta(NULL), eta_dot(NULL), eta_dotdot(NULL),
eta_mass(NULL), etap(NULL), etap_dot(NULL), etap_dotdot(NULL),
etap_mass(NULL)
rfix(nullptr), id_dilate(nullptr), irregular(nullptr), id_temp(nullptr), id_press(nullptr),
eta(nullptr), eta_dot(nullptr), eta_dotdot(nullptr),
eta_mass(nullptr), etap(nullptr), etap_dot(nullptr), etap_dotdot(nullptr),
etap_mass(nullptr)
{
if (narg < 4) error->all(FLERR,"Illegal fix nvt/npt/nph command");
@ -72,7 +72,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) :
pcouple = NONE;
drag = 0.0;
allremap = 1;
id_dilate = NULL;
id_dilate = nullptr;
mtchain = mpchain = 3;
nc_tchain = nc_pchain = 1;
mtk_flag = 1;
@ -88,8 +88,8 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) :
tcomputeflag = 0;
pcomputeflag = 0;
id_temp = NULL;
id_press = NULL;
id_temp = nullptr;
id_press = nullptr;
// turn on tilt factor scaling, whenever applicable
@ -579,10 +579,10 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) :
}
nrigid = 0;
rfix = NULL;
rfix = nullptr;
if (pre_exchange_flag) irregular = new Irregular(lmp);
else irregular = NULL;
else irregular = nullptr;
// initialize vol0,t0 to zero to signal uninitialized
// values then assigned in init(), if necessary
@ -740,7 +740,7 @@ void FixNH::init()
delete [] rfix;
nrigid = 0;
rfix = NULL;
rfix = nullptr;
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->rigid_flag) nrigid++;
@ -767,7 +767,7 @@ void FixNH::setup(int /*vflag*/)
// If no thermostat or using fix nphug,
// t_target must be defined by other means.
if (tstat_flag && strstr(style,"nphug") == NULL) {
if (tstat_flag && strstr(style,"nphug") == nullptr) {
compute_temp_target();
} else if (pstat_flag) {
@ -1768,7 +1768,7 @@ void *FixNH::extract(const char *str, int &dim)
} else if (pstat_flag && strcmp(str,"p_target") == 0) {
return &p_target;
}
return NULL;
return nullptr;
}
/* ----------------------------------------------------------------------