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:
@ -25,8 +25,8 @@ BaseChargeT::BaseCharge() : _compiled(false), _max_bytes(0) {
|
||||
device=&global_device;
|
||||
ans=new Answer<numtyp,acctyp>();
|
||||
nbor=new Neighbor();
|
||||
pair_program=NULL;
|
||||
ucl_device=NULL;
|
||||
pair_program=nullptr;
|
||||
ucl_device=nullptr;
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
@ -137,7 +137,7 @@ int * BaseChargeT::reset_nbors(const int nall, const int inum, int *ilist,
|
||||
resize_atom(inum,nall,success);
|
||||
resize_local(inum,mn,success);
|
||||
if (!success)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
nbor->get_host(inum,ilist,numj,firstneigh,block_size());
|
||||
|
||||
@ -240,7 +240,7 @@ int** BaseChargeT::compute(const int ago, const int inum_full,
|
||||
// Make sure textures are correct if realloc by a different hybrid style
|
||||
resize_atom(0,nall,success);
|
||||
zero_timers();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
hd_balancer.balance(cpu_time);
|
||||
@ -253,7 +253,7 @@ int** BaseChargeT::compute(const int ago, const int inum_full,
|
||||
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_q_data(host_q);
|
||||
hd_balancer.start_timer();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user