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,7 +25,7 @@ using namespace LAMMPS_NS;
|
||||
DumpLocalGZ::DumpLocalGZ(LAMMPS *lmp, int narg, char **arg) :
|
||||
DumpLocal(lmp, narg, arg)
|
||||
{
|
||||
gzFp = NULL;
|
||||
gzFp = nullptr;
|
||||
|
||||
compression_level = Z_BEST_COMPRESSION;
|
||||
|
||||
@ -39,8 +39,8 @@ DumpLocalGZ::DumpLocalGZ(LAMMPS *lmp, int narg, char **arg) :
|
||||
DumpLocalGZ::~DumpLocalGZ()
|
||||
{
|
||||
if (gzFp) gzclose(gzFp);
|
||||
gzFp = NULL;
|
||||
fp = NULL;
|
||||
gzFp = nullptr;
|
||||
fp = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -104,8 +104,8 @@ void DumpLocalGZ::openfile()
|
||||
|
||||
gzFp = gzopen(filecurrent, mode.c_str());
|
||||
|
||||
if (gzFp == NULL) error->one(FLERR,"Cannot open dump file");
|
||||
} else gzFp = NULL;
|
||||
if (gzFp == nullptr) error->one(FLERR,"Cannot open dump file");
|
||||
} else gzFp = nullptr;
|
||||
|
||||
// delete string with timestep replaced
|
||||
|
||||
@ -170,7 +170,7 @@ void DumpLocalGZ::write()
|
||||
if (filewriter) {
|
||||
if (multifile) {
|
||||
gzclose(gzFp);
|
||||
gzFp = NULL;
|
||||
gzFp = nullptr;
|
||||
} else {
|
||||
if (flush_flag)
|
||||
gzflush(gzFp,Z_SYNC_FLUSH);
|
||||
|
||||
Reference in New Issue
Block a user