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:
@ -34,7 +34,7 @@ enum{NONE,CONSTANT,EQUAL};
|
||||
|
||||
FixAveForce::FixAveForce(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
xstr(NULL), ystr(NULL), zstr(NULL), idregion(NULL)
|
||||
xstr(nullptr), ystr(nullptr), zstr(nullptr), idregion(nullptr)
|
||||
{
|
||||
if (narg < 6) error->all(FLERR,"Illegal fix aveforce command");
|
||||
|
||||
@ -46,7 +46,7 @@ FixAveForce::FixAveForce(LAMMPS *lmp, int narg, char **arg) :
|
||||
respa_level_support = 1;
|
||||
ilevel_respa = nlevels_respa = 0;
|
||||
|
||||
xstr = ystr = zstr = NULL;
|
||||
xstr = ystr = zstr = nullptr;
|
||||
|
||||
if (strstr(arg[3],"v_") == arg[3]) {
|
||||
int n = strlen(&arg[3][2]) + 1;
|
||||
@ -82,7 +82,7 @@ FixAveForce::FixAveForce(LAMMPS *lmp, int narg, char **arg) :
|
||||
// optional args
|
||||
|
||||
iregion = -1;
|
||||
idregion = NULL;
|
||||
idregion = nullptr;
|
||||
|
||||
int iarg = 6;
|
||||
while (iarg < narg) {
|
||||
@ -197,7 +197,7 @@ void FixAveForce::post_force(int /*vflag*/)
|
||||
{
|
||||
// update region if necessary
|
||||
|
||||
Region *region = NULL;
|
||||
Region *region = nullptr;
|
||||
if (iregion >= 0) {
|
||||
region = domain->regions[iregion];
|
||||
region->prematch();
|
||||
@ -265,7 +265,7 @@ void FixAveForce::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
||||
|
||||
if (ilevel == ilevel_respa) post_force(vflag);
|
||||
else {
|
||||
Region *region = NULL;
|
||||
Region *region = nullptr;
|
||||
if (iregion >= 0) {
|
||||
region = domain->regions[iregion];
|
||||
region->prematch();
|
||||
|
||||
Reference in New Issue
Block a user