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

@ -33,10 +33,10 @@ BaseEllipsoidT::BaseEllipsoid() : _compiled(false), _max_bytes(0) {
device=&global_device;
ans=new Answer<numtyp,acctyp>();
nbor=new Neighbor();
nbor_program=NULL;
ellipsoid_program=NULL;
lj_program=NULL;
ucl_device=NULL;
nbor_program=nullptr;
ellipsoid_program=nullptr;
lj_program=nullptr;
ucl_device=nullptr;
}
template <class numtyp, class acctyp>
@ -356,7 +356,7 @@ int* BaseEllipsoidT::compute(const int f_ago, const int inum_full,
if (inum_full==0) {
host_start=0;
zero_timers();
return NULL;
return nullptr;
}
int ago=hd_balancer.ago_first(f_ago);
@ -369,7 +369,7 @@ int* BaseEllipsoidT::compute(const int f_ago, const int inum_full,
reset_nbors(nall, inum, inum_full, ilist, numj, host_type, firstneigh,
success);
if (!success)
return NULL;
return nullptr;
}
int *list;
if (_multiple_forms)
@ -406,7 +406,7 @@ int** BaseEllipsoidT::compute(const int ago, const int inum_full, const int nall
if (inum_full==0) {
host_start=0;
zero_timers();
return NULL;
return nullptr;
}
hd_balancer.balance(cpu_time);
@ -420,7 +420,7 @@ int** BaseEllipsoidT::compute(const int ago, const int inum_full, const int nall
build_nbor_list(inum, inum_full-inum, nall, host_x, host_type,
sublo, subhi, tag, nspecial, special, success);
if (!success)
return NULL;
return nullptr;
atom->cast_quat_data(host_quat[0]);
hd_balancer.start_timer();
} else {