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

@ -39,19 +39,19 @@ RCB::RCB(LAMMPS *lmp) : Pointers(lmp)
MPI_Comm_size(world,&nprocs);
ndot = maxdot = 0;
dots = NULL;
dots = nullptr;
nlist = maxlist = 0;
dotlist = dotmark = dotmark_select = NULL;
dotlist = dotmark = dotmark_select = nullptr;
maxbuf = 0;
buf = NULL;
buf = nullptr;
maxrecv = maxsend = 0;
recvproc = recvindex = sendproc = sendindex = NULL;
recvproc = recvindex = sendproc = sendindex = nullptr;
tree = NULL;
irregular = NULL;
tree = nullptr;
irregular = nullptr;
// create MPI data and function types for box and median AllReduce ops
@ -95,7 +95,7 @@ RCB::~RCB()
NEW version: each RCB cut is tested in all dimensions
dimeension that produces 2 boxes with largest min size is selected
this is to prevent very narrow boxes from being produced
if wt = NULL, ignore per-particle weights
if wt = nullptr, ignore per-particle weights
if wt defined, per-particle weights > 0.0
dimension = 2 or 3
as documented in rcb.h:
@ -573,10 +573,10 @@ void RCB::compute(int dimension, int n, double **x, double *wt,
// handshake before sending dots to insure recvs have been posted
if (readnumber > 0) {
MPI_Send(NULL,0,MPI_INT,procpartner,0,world);
if (readnumber == 2) MPI_Send(NULL,0,MPI_INT,procpartner2,0,world);
MPI_Send(nullptr,0,MPI_INT,procpartner,0,world);
if (readnumber == 2) MPI_Send(nullptr,0,MPI_INT,procpartner2,0,world);
}
MPI_Recv(NULL,0,MPI_INT,procpartner,0,world,MPI_STATUS_IGNORE);
MPI_Recv(nullptr,0,MPI_INT,procpartner,0,world,MPI_STATUS_IGNORE);
// send dots to partner
@ -632,7 +632,7 @@ void RCB::compute(int dimension, int n, double **x, double *wt,
/* ----------------------------------------------------------------------
perform RCB balancing of N particles at coords X in bounding box LO/HI
OLD version: each RCB cut is made in longest dimension of sub-box
if wt = NULL, ignore per-particle weights
if wt = nullptr, ignore per-particle weights
if wt defined, per-particle weights > 0.0
dimension = 2 or 3
as documented in rcb.h:
@ -1065,10 +1065,10 @@ void RCB::compute_old(int dimension, int n, double **x, double *wt,
// handshake before sending dots to insure recvs have been posted
if (readnumber > 0) {
MPI_Send(NULL,0,MPI_INT,procpartner,0,world);
if (readnumber == 2) MPI_Send(NULL,0,MPI_INT,procpartner2,0,world);
MPI_Send(nullptr,0,MPI_INT,procpartner,0,world);
if (readnumber == 2) MPI_Send(nullptr,0,MPI_INT,procpartner2,0,world);
}
MPI_Recv(NULL,0,MPI_INT,procpartner,0,world,MPI_STATUS_IGNORE);
MPI_Recv(nullptr,0,MPI_INT,procpartner,0,world,MPI_STATUS_IGNORE);
// send dots to partner