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

@ -60,7 +60,7 @@ namespace LAMMPS_NS {
* \param s buffer for storing the result of fgets()
* \param size size of buffer s (max number of bytes read by fgets())
* \param fp file pointer used by fgets()
* \param filename file name associated with fp (may be NULL; then LAMMPS will try to detect)
* \param filename file name associated with fp (may be nullptr; then LAMMPS will try to detect)
* \param error pointer to Error class instance (for abort) */
void sfgets(const char *srcname, int srcline, char *s, int size,
@ -75,7 +75,7 @@ namespace LAMMPS_NS {
* \param size size of data elements read by fread()
* \param num number of data elements read by fread()
* \param fp file pointer used by fread()
* \param filename file name associated with fp (may be NULL; then LAMMPS will try to detect)
* \param filename file name associated with fp (may be nullptr; then LAMMPS will try to detect)
* \param error pointer to Error class instance (for abort) */
void sfread(const char *srcname, int srcline, void *s, size_t size,
@ -354,7 +354,7 @@ namespace LAMMPS_NS {
* If the potential file has a ``UNITS`` tag in the first line, the
* tag's value is compared to the current unit style setting.
* The behavior of the function then depends on the value of the
* *auto_convert* parameter. If it is ``NULL``, then the unit values
* *auto_convert* parameter. If it is ``nullptr``, then the unit values
* must match or else the open will fail with an error. Otherwise
* the bitmask that *auto_convert* points to is used check for
* compatibility with possible automatic conversions by the calling
@ -363,8 +363,8 @@ namespace LAMMPS_NS {
*
* \param name file- or pathname of the potential file
* \param lmp pointer to top-level LAMMPS class instance
* \param auto_convert pointer to unit conversion bitmask or NULL
* \return FILE pointer of the opened potential file or NULL*/
* \param auto_convert pointer to unit conversion bitmask or nullptr
* \return FILE pointer of the opened potential file or nullptr*/
FILE *open_potential(const std::string &name, LAMMPS *lmp, int *auto_convert);