Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / listed-forces / orires.cpp
index 93be131e79b92208f5dbdaad910b82511a9a2fd4..b48ea8a9308853453c05be06c921ab475cb232be 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.
@@ -99,12 +99,12 @@ void init_orires(FILE *fplog, const gmx_mtop_t *mtop,
 
     od->fc  = ir->orires_fc;
     od->nex = 0;
-    od->S   = NULL;
-    od->M   = NULL;
-    od->eig = NULL;
-    od->v   = NULL;
+    od->S   = nullptr;
+    od->M   = nullptr;
+    od->eig = nullptr;
+    od->v   = nullptr;
 
-    nr_ex = NULL;
+    nr_ex = nullptr;
 
     iloop = gmx_mtop_ilistloop_init(mtop);
     while (gmx_mtop_ilistloop_next(iloop, &il, &nmol))
@@ -211,12 +211,12 @@ void init_orires(FILE *fplog, const gmx_mtop_t *mtop,
     const t_atom *atom;
     while (gmx_mtop_atomloop_all_next(aloop, &i, &atom))
     {
-        if (mtop->groups.grpnr[egcORFIT] == NULL ||
+        if (mtop->groups.grpnr[egcORFIT] == nullptr ||
             mtop->groups.grpnr[egcORFIT][i] == 0)
         {
             /* Not correct for free-energy with changing masses */
             od->mref[j] = atom->m;
-            if (ms == NULL || MASTERSIM(ms))
+            if (ms == nullptr || MASTERSIM(ms))
             {
                 copy_rvec(xref[i], od->xref[j]);
                 for (d = 0; d < DIM; d++)
@@ -229,7 +229,7 @@ void init_orires(FILE *fplog, const gmx_mtop_t *mtop,
         }
     }
     svmul(1.0/mtot, com, com);
-    if (ms == NULL || MASTERSIM(ms))
+    if (ms == nullptr || MASTERSIM(ms))
     {
         for (j = 0; j < od->nref; j++)
         {
@@ -271,7 +271,7 @@ void diagonalize_orires_tensors(t_oriresdata *od)
     int           ex, i, j, nrot, ord[DIM], t;
     matrix        S, TMP;
 
-    if (od->M == NULL)
+    if (od->M == nullptr)
     {
         snew(od->M, DIM);
         for (i = 0; i < DIM; i++)