Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_mk_angndx.cpp
index 133c39d11c1a91324fbb9d81dc5a6e860a09db52..0609897bd22badcf2555a879f6cd0821e297e5ae 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.
@@ -208,7 +208,7 @@ static void fill_ang(int nft, int *ft, int fac,
 
 static int *select_ftype(const char *opt, int *nft, int *mult)
 {
-    int *ft = NULL, ftype;
+    int *ft = nullptr, ftype;
 
     if (opt[0] == 'a')
     {
@@ -255,7 +255,7 @@ int gmx_mk_angndx(int argc, char *argv[])
         "angle distributions etc. It uses a run input file ([REF].tpx[ref]) for the",
         "definitions of the angles, dihedrals etc."
     };
-    static const char *opt[] = { NULL, "angle", "dihedral", "improper", "ryckaert-bellemans", NULL };
+    static const char *opt[] = { nullptr, "angle", "dihedral", "improper", "ryckaert-bellemans", nullptr };
     static gmx_bool    bH    = TRUE;
     static real        hq    = -1;
     t_pargs            pa[]  = {
@@ -277,22 +277,22 @@ int gmx_mk_angndx(int argc, char *argv[])
     int               *nr;
     char             **grpnames;
     t_filenm           fnm[] = {
-        { efTPR, NULL, NULL, ffREAD  },
-        { efNDX, NULL, "angle", ffWRITE }
+        { efTPR, nullptr, nullptr, ffREAD  },
+        { efNDX, nullptr, "angle", ffWRITE }
     };
 #define NFILE asize(fnm)
 
     if (!parse_common_args(&argc, argv, 0, NFILE, fnm, asize(pa), pa,
-                           asize(desc), desc, 0, NULL, &oenv))
+                           asize(desc), desc, 0, nullptr, &oenv))
     {
         return 0;
     }
 
-    GMX_RELEASE_ASSERT(opt[0] != 0, "Options inconsistency; opt[0] is NULL");
+    GMX_RELEASE_ASSERT(opt[0] != nullptr, "Options inconsistency; opt[0] is NULL");
 
     ft = select_ftype(opt[0], &nft, &mult);
 
-    top = read_top(ftp2fn(efTPR, NFILE, fnm), NULL);
+    top = read_top(ftp2fn(efTPR, NFILE, fnm), nullptr);
 
     ntype = calc_ntype(nft, ft, &(top->idef));
     snew(grpnames, ntype);