Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / mdlib / mdatoms.cpp
index bbcba4bfaee2e1e580f9798c272f6a1a78eaaa6f..15cca135cbe945af7e828da005dd24261d1b6417 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) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
@@ -204,11 +204,11 @@ void atoms2md(const gmx_mtop_t *mtop, const t_inputrec *ir,
          * Therefore, when adding code, the user should use something like:
          * gprnrU1 = (md->cU1==NULL ? 0 : md->cU1[localatindex])
          */
-        if (mtop->groups.grpnr[egcUser1] != NULL)
+        if (mtop->groups.grpnr[egcUser1] != nullptr)
         {
             srenew(md->cU1, md->nalloc);
         }
-        if (mtop->groups.grpnr[egcUser2] != NULL)
+        if (mtop->groups.grpnr[egcUser2] != nullptr)
         {
             srenew(md->cU2, md->nalloc);
         }
@@ -232,7 +232,7 @@ void atoms2md(const gmx_mtop_t *mtop, const t_inputrec *ir,
             real     mA, mB, fac;
             real     c6, c12;
 
-            if (index == NULL)
+            if (index == nullptr)
             {
                 ag = i;
             }
@@ -397,7 +397,7 @@ void atoms2md(const gmx_mtop_t *mtop, const t_inputrec *ir,
 
             if (ir->bQMMM)
             {
-                if (groups->grpnr[egcQMMM] == 0 ||
+                if (groups->grpnr[egcQMMM] == nullptr ||
                     groups->grpnr[egcQMMM][ag] < groups->grps[egcQMMM].nr-1)
                 {
                     md->bQM[i]      = TRUE;