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

@ -89,7 +89,7 @@ Domain::Domain(LAMMPS *lmp) : Pointers(lmp)
boxlo_lamda[0] = boxlo_lamda[1] = boxlo_lamda[2] = 0.0;
boxhi_lamda[0] = boxhi_lamda[1] = boxhi_lamda[2] = 1.0;
lattice = NULL;
lattice = nullptr;
char **args = new char*[2];
args[0] = (char *) "none";
args[1] = (char *) "1.0";
@ -97,7 +97,7 @@ Domain::Domain(LAMMPS *lmp) : Pointers(lmp)
delete [] args;
nregion = maxregion = 0;
regions = NULL;
regions = nullptr;
copymode = 0;
@ -1640,7 +1640,7 @@ void Domain::image_flip(int m, int n, int p)
return 1 if this proc owns atom with coords x, else return 0
x is returned remapped into periodic box
if image flag is passed, flag is updated via remap(x,image)
if image = NULL is passed, no update with remap(x)
if image = nullptr is passed, no update with remap(x)
if shrinkexceed, atom can be outside shrinkwrap boundaries
called from create_atoms() in library.cpp
------------------------------------------------------------------------- */
@ -1727,7 +1727,7 @@ int Domain::ownatom(int /*id*/, double *x, imageint *image, int shrinkexceed)
void Domain::set_lattice(int narg, char **arg)
{
if (lattice) delete lattice;
lattice = NULL;
lattice = nullptr;
lattice = new Lattice(lmp,narg,arg);
}