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

@ -20,7 +20,7 @@ namespace LAMMPS_AL {
template <class numtyp, class acctyp>
AnswerT::Answer() : _allocated(false),_eflag(false),_vflag(false),
_inum(0),_ilist(NULL),_newton(false) {
_inum(0),_ilist(nullptr),_newton(false) {
}
template <class numtyp, class acctyp>
@ -119,7 +119,7 @@ void AnswerT::clear() {
engv.clear();
time_answer.clear();
_inum=0;
_ilist=NULL;
_ilist=nullptr;
_eflag=false;
_vflag=false;
}
@ -180,7 +180,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom,
for (int i=0; i<_inum; i++)
evdwl+=engv[i];
if (_ef_atom) {
if (_ilist==NULL) {
if (_ilist==nullptr) {
for (int i=0; i<_inum; i++)
eatom[i]+=engv[i];
} else {
@ -196,7 +196,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom,
for (int i=vstart; i<iend; i++)
virial[j]+=engv[i];
if (_vf_atom){
if (_ilist==NULL) {
if (_ilist==nullptr) {
int ii=0;
for (int i=vstart; i<iend; i++)
vatom[ii++][j]+=engv[i];
@ -232,7 +232,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom,
for (int i=_inum; i<iend; i++)
ecoul+=engv[i];
if (_ef_atom) {
if (_ilist==NULL) {
if (_ilist==nullptr) {
for (int i=0; i<_inum; i++)
eatom[i]+=engv[i];
for (int i=_inum; i<iend; i++)
@ -252,7 +252,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom,
for (int i=vstart; i<iend; i++)
virial[j]+=engv[i];
if (_vf_atom) {
if (_ilist==NULL) {
if (_ilist==nullptr) {
for (int i=vstart, ii=0; i<iend; i++)
vatom[ii++][j]+=engv[i];
} else {
@ -271,7 +271,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom,
template <class numtyp, class acctyp>
void AnswerT::get_answers(double **f, double **tor) {
int fl=0;
if (_ilist==NULL) {
if (_ilist==nullptr) {
for (int i=0; i<_inum; i++) {
f[i][0]+=force[fl];
f[i][1]+=force[fl+1];