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:
@ -37,7 +37,7 @@ enum{TYPE,RADIUS};
|
||||
|
||||
ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg),
|
||||
pstyle(NULL), pindex(NULL), vlocal(NULL), alocal(NULL)
|
||||
pstyle(nullptr), pindex(nullptr), vlocal(nullptr), alocal(nullptr)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute pair/local command");
|
||||
|
||||
@ -97,8 +97,8 @@ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
else size_local_cols = nvalues;
|
||||
|
||||
nmax = 0;
|
||||
vlocal = NULL;
|
||||
alocal = NULL;
|
||||
vlocal = nullptr;
|
||||
alocal = nullptr;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -115,7 +115,7 @@ ComputePairLocal::~ComputePairLocal()
|
||||
|
||||
void ComputePairLocal::init()
|
||||
{
|
||||
if (singleflag && force->pair == NULL)
|
||||
if (singleflag && force->pair == nullptr)
|
||||
error->all(FLERR,"No pair style is defined for compute pair/local");
|
||||
if (singleflag && force->pair->single_enable == 0)
|
||||
error->all(FLERR,"Pair style does not support compute pair/local");
|
||||
|
||||
Reference in New Issue
Block a user