Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / gpp_atomtype.cpp
index 858e36d7b04443f9394721836eab3af47703f4f8..68538e842636e5c4a841583c3cae4f34413abebb 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2014,2015,2017, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -92,7 +92,7 @@ char *get_atomtype_name(int nt, gpp_atomtype_t ga)
 {
     if ((nt < 0) || (nt >= ga->nr))
     {
-        return NULL;
+        return nullptr;
     }
 
     return *(ga->atomname[nt]);
@@ -238,16 +238,16 @@ gpp_atomtype_t init_atomtype(void)
     snew(ga, 1);
 
     ga->nr           = 0;
-    ga->atom         = NULL;
-    ga->atomname     = NULL;
-    ga->nb           = NULL;
-    ga->bondatomtype = NULL;
-    ga->radius       = NULL;
-    ga->vol          = NULL;
-    ga->surftens     = NULL;
-    ga->atomnumber   = NULL;
-    ga->gb_radius    = NULL;
-    ga->S_hct        = NULL;
+    ga->atom         = nullptr;
+    ga->atomname     = nullptr;
+    ga->nb           = nullptr;
+    ga->bondatomtype = nullptr;
+    ga->radius       = nullptr;
+    ga->vol          = nullptr;
+    ga->surftens     = nullptr;
+    ga->atomnumber   = nullptr;
+    ga->gb_radius    = nullptr;
+    ga->S_hct        = nullptr;
 
     return ga;
 }
@@ -309,7 +309,7 @@ int add_atomtype(gpp_atomtype_t ga, t_symtab *tab,
     {
         if (strcmp(*ga->atomname[i], name) == 0)
         {
-            if (NULL != debug)
+            if (nullptr != debug)
             {
                 fprintf(debug, "Trying to add atomtype %s again. Skipping it.\n", name);
             }
@@ -528,7 +528,7 @@ void renum_atype(t_params plist[], gmx_mtop_t *mtop,
     }
 
     /* Renumber nlist */
-    nbsnew = NULL;
+    nbsnew = nullptr;
     snew(nbsnew, plist[ftype].nr);
 
     nrfp  = NRFP(ftype);