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:
@ -53,8 +53,8 @@ using namespace FixConst;
|
||||
|
||||
FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
p(NULL), nlocal(0), gatindex(NULL), masses(NULL), charges(NULL),
|
||||
id_pe(NULL), id_press(NULL)
|
||||
p(nullptr), nlocal(0), gatindex(nullptr), masses(nullptr), charges(nullptr),
|
||||
id_pe(nullptr), id_press(nullptr)
|
||||
{
|
||||
|
||||
if (!atom->tag_enable)
|
||||
@ -68,7 +68,7 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
|
||||
"Group will be ignored.");
|
||||
|
||||
#if defined(__PLUMED_DEFAULT_KERNEL)
|
||||
if (getenv("PLUMED_KERNEL") == NULL)
|
||||
if (getenv("PLUMED_KERNEL") == nullptr)
|
||||
putenv(plumed_default_kernel);
|
||||
#endif
|
||||
|
||||
@ -101,7 +101,7 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
|
||||
// it is defined inside plumed.
|
||||
p->cmd("GREX setMPIIntercomm",&inter_comm);
|
||||
}
|
||||
p->cmd("GREX init",NULL);
|
||||
p->cmd("GREX init",nullptr);
|
||||
}
|
||||
|
||||
// The general communicator is independent of the existence of partitions,
|
||||
|
||||
Reference in New Issue
Block a user