From 1597cd5dcb87a0cb4e83492403ec3dd1fe4f5a72 Mon Sep 17 00:00:00 2001 From: Anne Gunn Date: Sat, 12 Sep 2020 09:02:31 -0600 Subject: [PATCH] T2345: After examining comments changed by batch conversion of NULL to nullptr, I've corrected a small number where it seemed clear that the previous NULL should have been either "NULL" (where the code is looking for a string with that value), or null char / null byte (where the comment is talking about the char/byte that terminates a c-style string). Also changed 6 places where the batch change had changed 'NULL ptr' to 'nullptr ptr'. Now they simply say 'nullptr'. --- src/GPU/pair_eam_alloy_gpu.cpp | 2 +- src/GPU/pair_eam_fs_gpu.cpp | 2 +- src/KOKKOS/pair_eam_alloy_kokkos.cpp | 2 +- src/KOKKOS/pair_eam_fs_kokkos.cpp | 2 +- src/MANYBODY/pair_adp.cpp | 2 +- src/MANYBODY/pair_airebo.cpp | 2 +- src/MANYBODY/pair_airebo.h | 2 +- src/MANYBODY/pair_comb.cpp | 2 +- src/MANYBODY/pair_comb3.cpp | 2 +- src/MANYBODY/pair_eam_alloy.cpp | 2 +- src/MANYBODY/pair_eam_fs.cpp | 2 +- src/MANYBODY/pair_eim.cpp | 2 +- src/MANYBODY/pair_gw.cpp | 2 +- src/MANYBODY/pair_lcbop.cpp | 4 ++-- src/MANYBODY/pair_lcbop.h | 2 +- src/MANYBODY/pair_nb3b_harmonic.cpp | 2 +- src/MANYBODY/pair_polymorphic.cpp | 2 +- src/MANYBODY/pair_sw.cpp | 2 +- src/MANYBODY/pair_tersoff.cpp | 2 +- src/MANYBODY/pair_vashishta.cpp | 2 +- src/USER-COLVARS/fix_colvars.cpp | 2 +- src/USER-INTEL/pair_eam_alloy_intel.cpp | 2 +- src/USER-INTEL/pair_eam_fs_intel.cpp | 2 +- src/USER-MEAMC/pair_meamc.cpp | 2 +- src/USER-MISC/pair_agni.cpp | 2 +- src/USER-MISC/pair_drip.cpp | 2 +- src/USER-MISC/pair_edip.cpp | 2 +- src/USER-MISC/pair_edip_multi.cpp | 2 +- src/USER-MISC/pair_extep.cpp | 2 +- src/USER-MISC/pair_ilp_graphene_hbn.cpp | 2 +- src/USER-MISC/pair_kolmogorov_crespi_full.cpp | 2 +- src/USER-MISC/pair_kolmogorov_crespi_z.cpp | 2 +- src/USER-MISC/pair_lebedeva_z.cpp | 2 +- src/USER-MISC/pair_meam_spline.cpp | 2 +- src/USER-MISC/pair_meam_sw_spline.cpp | 2 +- src/USER-MISC/pair_tersoff_table.cpp | 2 +- src/USER-OMP/pair_eam_alloy_omp.cpp | 2 +- src/USER-OMP/pair_eam_fs_omp.cpp | 2 +- src/USER-REAXC/pair_reaxc.cpp | 2 +- src/USER-SMTBQ/pair_smtbq.cpp | 2 +- src/atom.cpp | 4 ++-- src/fix_spring_rg.cpp | 2 +- src/input.cpp | 12 ++++++------ src/pair_coul_streitz.cpp | 2 +- src/read_dump.cpp | 8 ++++---- src/run.cpp | 2 +- 46 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index 9dd5c85c49..998ca92936 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -324,7 +324,7 @@ void PairEAMAlloyGPU::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index 10f6b4ebe9..5559bb470f 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -324,7 +324,7 @@ void PairEAMFSGPU::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 4e0c44acba..52882c8be8 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -938,7 +938,7 @@ void PairEAMAlloyKokkos::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 2714da9cae..d697cfbe9a 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -938,7 +938,7 @@ void PairEAMFSKokkos::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/MANYBODY/pair_adp.cpp b/src/MANYBODY/pair_adp.cpp index 4eeab89381..3b98c91cb8 100644 --- a/src/MANYBODY/pair_adp.cpp +++ b/src/MANYBODY/pair_adp.cpp @@ -465,7 +465,7 @@ void PairADP::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 8643f54812..eb92e0c58a 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -185,7 +185,7 @@ void PairAIREBO::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to C and H - // map[i] = which element (0,1) the Ith atom type is, -1 if nullptr + // map[i] = which element (0,1) the Ith atom type is, -1 if "NULL" for (int i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/MANYBODY/pair_airebo.h b/src/MANYBODY/pair_airebo.h index d605ddc2d8..7539cc5e7f 100644 --- a/src/MANYBODY/pair_airebo.h +++ b/src/MANYBODY/pair_airebo.h @@ -40,7 +40,7 @@ class PairAIREBO : public Pair { enum { AIREBO, REBO_2, AIREBO_M }; // for telling class variants apart in shared code protected: - int *map; // 0 (C), 1 (H), or -1 (nullptr) for each type + int *map; // 0 (C), 1 (H), or -1 ("NULL") for each type int variant; int ljflag,torflag; // 0/1 if LJ/Morse,torsion terms included diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 0e2ac8dac9..95b49b98f9 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -456,7 +456,7 @@ void PairComb::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index fd4f1b3822..01a1538f7b 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -192,7 +192,7 @@ void PairComb3::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp index 055a2baf11..f17d500a40 100644 --- a/src/MANYBODY/pair_eam_alloy.cpp +++ b/src/MANYBODY/pair_eam_alloy.cpp @@ -70,7 +70,7 @@ void PairEAMAlloy::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp index 90c24bb254..1c055e1bcf 100644 --- a/src/MANYBODY/pair_eam_fs.cpp +++ b/src/MANYBODY/pair_eam_fs.cpp @@ -70,7 +70,7 @@ void PairEAMFS::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index 69e2832b37..8f229060cf 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -388,7 +388,7 @@ void PairEIM::coeff(int narg, char **arg) read_file(arg[2+nelements]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3 + nelements; i < narg; i++) { m = i - (3+nelements) + 1; diff --git a/src/MANYBODY/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp index dd9b55b7bf..6a97975d45 100644 --- a/src/MANYBODY/pair_gw.cpp +++ b/src/MANYBODY/pair_gw.cpp @@ -283,7 +283,7 @@ void PairGW::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index c84361d7a6..760ffc8cd8 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -135,8 +135,8 @@ void PairLCBOP::coeff(int narg, char **arg) if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); - // read args that map atom types to C and nullptr - // map[i] = which element (0 for C) the Ith atom type is, -1 if nullptr + // read args that map atom types to C and "NULL" + // map[i] = which element (0 for C) the Ith atom type is, -1 if "NULL" for (int i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/MANYBODY/pair_lcbop.h b/src/MANYBODY/pair_lcbop.h index 9ca2e3d55e..dacbe74158 100644 --- a/src/MANYBODY/pair_lcbop.h +++ b/src/MANYBODY/pair_lcbop.h @@ -39,7 +39,7 @@ class PairLCBOP : public Pair { protected: int **pages; // neighbor list pages - int *map; // 0 (C) or -1 (nullptr) for each type + int *map; // 0 (C) or -1 ("NULL") for each type int me; diff --git a/src/MANYBODY/pair_nb3b_harmonic.cpp b/src/MANYBODY/pair_nb3b_harmonic.cpp index a361955fa7..859652dd10 100644 --- a/src/MANYBODY/pair_nb3b_harmonic.cpp +++ b/src/MANYBODY/pair_nb3b_harmonic.cpp @@ -198,7 +198,7 @@ void PairNb3bHarmonic::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index cdf9a7f23a..99eb2fec55 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -479,7 +479,7 @@ void PairPolymorphic::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_sw.cpp b/src/MANYBODY/pair_sw.cpp index 9db9adf423..b74eda0f85 100644 --- a/src/MANYBODY/pair_sw.cpp +++ b/src/MANYBODY/pair_sw.cpp @@ -262,7 +262,7 @@ void PairSW::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index 21a8f7de67..b8379d15cc 100644 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -306,7 +306,7 @@ void PairTersoff::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/MANYBODY/pair_vashishta.cpp b/src/MANYBODY/pair_vashishta.cpp index fea414f5fb..10ac2c418f 100644 --- a/src/MANYBODY/pair_vashishta.cpp +++ b/src/MANYBODY/pair_vashishta.cpp @@ -269,7 +269,7 @@ void PairVashishta::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-COLVARS/fix_colvars.cpp b/src/USER-COLVARS/fix_colvars.cpp index eaa0d272c3..57162df249 100644 --- a/src/USER-COLVARS/fix_colvars.cpp +++ b/src/USER-COLVARS/fix_colvars.cpp @@ -961,7 +961,7 @@ void FixColvars::write_restart(FILE *fp) proxy->serialize_status(rest_text); // TODO call write_output_files() const char *cvm_state = rest_text.c_str(); - int len = strlen(cvm_state) + 1; // need to include terminating nullptr byte. + int len = strlen(cvm_state) + 1; // need to include terminating null byte. fwrite(&len,sizeof(int),1,fp); fwrite(cvm_state,1,len,fp); } diff --git a/src/USER-INTEL/pair_eam_alloy_intel.cpp b/src/USER-INTEL/pair_eam_alloy_intel.cpp index b93c9bc8c0..b78baf896f 100644 --- a/src/USER-INTEL/pair_eam_alloy_intel.cpp +++ b/src/USER-INTEL/pair_eam_alloy_intel.cpp @@ -69,7 +69,7 @@ void PairEAMAlloyIntel::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/USER-INTEL/pair_eam_fs_intel.cpp b/src/USER-INTEL/pair_eam_fs_intel.cpp index 2165f10aff..84cfcb8a11 100644 --- a/src/USER-INTEL/pair_eam_fs_intel.cpp +++ b/src/USER-INTEL/pair_eam_fs_intel.cpp @@ -69,7 +69,7 @@ void PairEAMFSIntel::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index 133bb611ca..4c4a3dcf62 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -556,7 +556,7 @@ void PairMEAMC::read_files(const std::string &globalfile, delete [] rozero; delete [] found; - // done if user param file is nullptr + // done if user param file is "NULL" if (userfile == "NULL") return; diff --git a/src/USER-MISC/pair_agni.cpp b/src/USER-MISC/pair_agni.cpp index afd600594b..0361942af1 100644 --- a/src/USER-MISC/pair_agni.cpp +++ b/src/USER-MISC/pair_agni.cpp @@ -266,7 +266,7 @@ void PairAGNI::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_drip.cpp b/src/USER-MISC/pair_drip.cpp index 449cf86699..b5b39a65a7 100644 --- a/src/USER-MISC/pair_drip.cpp +++ b/src/USER-MISC/pair_drip.cpp @@ -139,7 +139,7 @@ void PairDRIP::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_edip.cpp b/src/USER-MISC/pair_edip.cpp index 31dda8bb03..62d09e0c46 100644 --- a/src/USER-MISC/pair_edip.cpp +++ b/src/USER-MISC/pair_edip.cpp @@ -779,7 +779,7 @@ void PairEDIP::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_edip_multi.cpp b/src/USER-MISC/pair_edip_multi.cpp index 1a5d4925d9..07245b1728 100644 --- a/src/USER-MISC/pair_edip_multi.cpp +++ b/src/USER-MISC/pair_edip_multi.cpp @@ -539,7 +539,7 @@ void PairEDIPMulti::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_extep.cpp b/src/USER-MISC/pair_extep.cpp index 6d9f74de8e..d8fa565ae1 100644 --- a/src/USER-MISC/pair_extep.cpp +++ b/src/USER-MISC/pair_extep.cpp @@ -467,7 +467,7 @@ void PairExTeP::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_ilp_graphene_hbn.cpp b/src/USER-MISC/pair_ilp_graphene_hbn.cpp index f0c197ca3d..63ba47448a 100644 --- a/src/USER-MISC/pair_ilp_graphene_hbn.cpp +++ b/src/USER-MISC/pair_ilp_graphene_hbn.cpp @@ -167,7 +167,7 @@ void PairILPGrapheneHBN::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_kolmogorov_crespi_full.cpp b/src/USER-MISC/pair_kolmogorov_crespi_full.cpp index c308990839..0804f42b86 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_full.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_full.cpp @@ -168,7 +168,7 @@ void PairKolmogorovCrespiFull::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp index 80f57fb5dc..617a48c0fe 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp @@ -232,7 +232,7 @@ void PairKolmogorovCrespiZ::coeff(int narg, char **arg) utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_lebedeva_z.cpp b/src/USER-MISC/pair_lebedeva_z.cpp index cb65dc85f6..3168a35ab7 100644 --- a/src/USER-MISC/pair_lebedeva_z.cpp +++ b/src/USER-MISC/pair_lebedeva_z.cpp @@ -228,7 +228,7 @@ void PairLebedevaZ::coeff(int narg, char **arg) utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 455a21ada3..3be2a3858b 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -398,7 +398,7 @@ void PairMEAMSpline::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_meam_sw_spline.cpp b/src/USER-MISC/pair_meam_sw_spline.cpp index 0013fa5577..a8977a09d4 100644 --- a/src/USER-MISC/pair_meam_sw_spline.cpp +++ b/src/USER-MISC/pair_meam_sw_spline.cpp @@ -393,7 +393,7 @@ void PairMEAMSWSpline::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-MISC/pair_tersoff_table.cpp b/src/USER-MISC/pair_tersoff_table.cpp index 6e0cacaff7..bc6be2d399 100644 --- a/src/USER-MISC/pair_tersoff_table.cpp +++ b/src/USER-MISC/pair_tersoff_table.cpp @@ -755,7 +755,7 @@ void PairTersoffTable::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/USER-OMP/pair_eam_alloy_omp.cpp b/src/USER-OMP/pair_eam_alloy_omp.cpp index 9a797dafa2..2f29aced65 100644 --- a/src/USER-OMP/pair_eam_alloy_omp.cpp +++ b/src/USER-OMP/pair_eam_alloy_omp.cpp @@ -69,7 +69,7 @@ void PairEAMAlloyOMP::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/USER-OMP/pair_eam_fs_omp.cpp b/src/USER-OMP/pair_eam_fs_omp.cpp index d474e039bf..a7fd0cac51 100644 --- a/src/USER-OMP/pair_eam_fs_omp.cpp +++ b/src/USER-OMP/pair_eam_fs_omp.cpp @@ -69,7 +69,7 @@ void PairEAMFSOMP::coeff(int narg, char **arg) read_file(arg[2]); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" for (i = 3; i < narg; i++) { if (strcmp(arg[i],"NULL") == 0) { diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index 6a2ba7d754..fd97a26359 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -327,7 +327,7 @@ void PairReaxC::coeff( int nargs, char **args ) } // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" int itmp = 0; int nreax_types = system->reax_param.num_atom_types; diff --git a/src/USER-SMTBQ/pair_smtbq.cpp b/src/USER-SMTBQ/pair_smtbq.cpp index a40f676ff1..d84f302304 100644 --- a/src/USER-SMTBQ/pair_smtbq.cpp +++ b/src/USER-SMTBQ/pair_smtbq.cpp @@ -277,7 +277,7 @@ void PairSMTBQ::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/atom.cpp b/src/atom.cpp index a58e1e3181..539bf6fc0b 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2201,10 +2201,10 @@ void Atom::add_callback(int flag) int ifix; // find the fix - // if find nullptr ptr: + // if find nullptr: // it's this one, since it is being replaced and has just been deleted // at this point in re-creation - // if don't find nullptr ptr: + // if don't find nullptr: // i is set to nfix = new one currently being added at end of list for (ifix = 0; ifix < modify->nfix; ifix++) diff --git a/src/fix_spring_rg.cpp b/src/fix_spring_rg.cpp index 2805395053..6cd8637a5c 100644 --- a/src/fix_spring_rg.cpp +++ b/src/fix_spring_rg.cpp @@ -67,7 +67,7 @@ void FixSpringRG::init() { masstotal = group->mass(igroup); - // if rg0 was specified as nullptr, compute current Rg + // Compute current Rg // only occurs on 1st run if (rg0_flag) { diff --git a/src/input.cpp b/src/input.cpp index 5efbdfba3d..5e40d2dede 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -467,10 +467,10 @@ char *Input::nextword(char *str, char **next) // start = first char beyond quote // stop = first char of matching quote // next = first char beyond matching quote - // next must be nullptr or whitespace + // next must be null char or whitespace // if start is not single/double/triple quote: // stop = first whitespace char after start - // next = char after stop, or stop itself if stop is nullptr + // next = char after stop, or stop itself if stop is null char if (strstr(start,"\"\"\"") == start) { stop = strstr(&start[3],"\"\"\""); @@ -492,7 +492,7 @@ char *Input::nextword(char *str, char **next) else *next = stop+1; } - // set stop to nullptr to terminate word + // set stop to null char to terminate word *stop = '\0'; return start; @@ -510,9 +510,9 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag) // use str2 as scratch space to expand str, then copy back to str // reallocate str and str2 as necessary // do not replace $ inside single/double/triple quotes - // var = pts at variable name, ended by nullptr - // if $ is followed by '{', trailing '}' becomes nullptr - // else $x becomes x followed by nullptr + // var = pts at variable name, ended by null char + // if $ is followed by '{', trailing '}' becomes null char + // else $x becomes x followed by null char // beyond = points to text following variable int i,n,paren_count; diff --git a/src/pair_coul_streitz.cpp b/src/pair_coul_streitz.cpp index 6ff958483b..101aaf36a3 100644 --- a/src/pair_coul_streitz.cpp +++ b/src/pair_coul_streitz.cpp @@ -143,7 +143,7 @@ void PairCoulStreitz::coeff(int narg, char **arg) error->all(FLERR,"Incorrect args for pair coefficients"); // read args that map atom types to elements in potential file - // map[i] = which element the Ith atom type is, -1 if nullptr + // map[i] = which element the Ith atom type is, -1 if "NULL" // nelements = # of unique elements // elements = list of element names diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 2fd14b547a..dcbb95fccc 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -713,7 +713,7 @@ void ReadDump::read_atoms() if (nnew > maxnew || maxnew == 0) { memory->destroy(fields); - maxnew = MAX(nnew,1); // avoid nullptr ptr + maxnew = MAX(nnew,1); // avoid nullptr memory->create(fields,maxnew,nfield,"read_dump:fields"); } @@ -753,7 +753,7 @@ void ReadDump::read_atoms() nnew = static_cast (olast - ofirst); if (nnew > maxnew || maxnew == 0) { memory->destroy(fields); - maxnew = MAX(nnew,1); // avoid nullptr ptr + maxnew = MAX(nnew,1); // avoid nullptr memory->create(fields,maxnew,nfield,"read_dump:fields"); } @@ -779,7 +779,7 @@ void ReadDump::read_atoms() nnew = static_cast (sum); if (nnew > maxnew || maxnew == 0) { memory->destroy(fields); - maxnew = MAX(nnew,1); // avoid nullptr ptr + maxnew = MAX(nnew,1); // avoid nullptr memory->create(fields,maxnew,nfield,"read_dump:fields"); } @@ -1105,7 +1105,7 @@ void ReadDump::migrate_new_atoms() Irregular *irregular = new Irregular(lmp); int nrecv = irregular->create_data(nnew,procassign,1); int newmaxnew = MAX(nrecv,maxnew); - newmaxnew = MAX(newmaxnew,1); // avoid nullptr ptr + newmaxnew = MAX(newmaxnew,1); // avoid nullptr memory->create(newfields,newmaxnew,nfield,"read_dump:newfields"); irregular->exchange_data((char *) &fields[0][0],nfield*sizeof(double), (char *) &newfields[0][0]); diff --git a/src/run.cpp b/src/run.cpp index f5b571844f..2e55fba439 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -91,7 +91,7 @@ void Run::command(int narg, char **arg) // all remaining args are commands // first,last = arg index of first/last commands - // set ncommands = 0 if single command and it is nullptr + // set ncommands = 0 if single command and it is "NULL" } else if (strcmp(arg[iarg],"every") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal run command");