Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / resall.cpp
index 44dcc5f4b61e5fa61f190334af2c103aa5d1e791..a821f6461796dfca5f6cc6739ea7916d7a0dbd4e 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) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,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.
@@ -79,7 +79,7 @@ gpp_atomtype_t read_atype(const char *ffdir, t_symtab *tab)
             /* Skip blank or comment-only lines */
             do
             {
-                if (fgets2(buf, STRLEN, in) != NULL)
+                if (fgets2(buf, STRLEN, in) != nullptr)
                 {
                     strip_comment(buf);
                     trim(buf);
@@ -122,7 +122,7 @@ static void print_resatoms(FILE *out, gpp_atomtype_t atype, t_restp *rtp)
     {
         tp   = rtp->atom[j].type;
         tpnm = get_atomtype_name(tp, atype);
-        if (tpnm == NULL)
+        if (tpnm == nullptr)
         {
             gmx_fatal(FARGS, "Incorrect atomtype (%d)", tp);
         }
@@ -140,11 +140,11 @@ static gmx_bool read_atoms(FILE *in, char *line,
 
     /* Read Atoms */
     maxentries   = 0;
-    r0->atom     =     NULL;
-    r0->atomname = NULL;
-    r0->cgnr     =     NULL;
+    r0->atom     =     nullptr;
+    r0->atomname = nullptr;
+    r0->cgnr     =     nullptr;
     i            = 0;
-    while (get_a_line(in, line, STRLEN) && (strchr(line, '[') == NULL))
+    while (get_a_line(in, line, STRLEN) && (strchr(line, '[') == nullptr))
     {
         if (sscanf(line, "%s%s%lf%d", buf, buf1, &q, &cg) != 4)
         {
@@ -184,7 +184,7 @@ gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp)
     int  j, n, ni, maxrb;
 
     maxrb = rtp->rb[bt].nb;
-    while (get_a_line(in, line, STRLEN) && (strchr(line, '[') == NULL))
+    while (get_a_line(in, line, STRLEN) && (strchr(line, '[') == nullptr))
     {
         if (rtp->rb[bt].nb >= maxrb)
         {
@@ -206,7 +206,7 @@ gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp)
         }
         for (; j < MAXATOMLIST; j++)
         {
-            rtp->rb[bt].b[rtp->rb[bt].nb].a[j] = NULL;
+            rtp->rb[bt].b[rtp->rb[bt].nb].a[j] = nullptr;
         }
         while (isspace(line[n]))
         {