Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / selection / sm_position.cpp
index 1b22204c83d95118042b7ee54a36271a94818bd1..d1b1f457b16b41058ab67121eb2c0279f7d35dba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,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.
@@ -133,13 +133,13 @@ evaluate_pos(const gmx::SelMethodEvalContext &context,
 
 /** Parameters for position keyword evaluation. */
 static gmx_ana_selparam_t smparams_keyword_pos[] = {
-    {NULL,   {GROUP_VALUE, 1, {NULL}}, NULL, SPAR_DYNAMIC},
+    {nullptr,   {GROUP_VALUE, 1, {nullptr}}, nullptr, SPAR_DYNAMIC},
 };
 
 /** Parameters for the \p cog and \p com selection methods. */
 static gmx_ana_selparam_t smparams_com[] = {
-    {"of",   {GROUP_VALUE, 1, {NULL}}, NULL, SPAR_DYNAMIC},
-    {"pbc",  {NO_VALUE,    0, {NULL}}, NULL, 0},
+    {"of",   {GROUP_VALUE, 1, {nullptr}}, nullptr, SPAR_DYNAMIC},
+    {"pbc",  {NO_VALUE,    0, {nullptr}}, nullptr, 0},
 };
 
 /** Selection method data for position keyword evaluation. */
@@ -151,10 +151,10 @@ gmx_ana_selmethod_t sm_keyword_pos = {
     &init_kwpos,
     &init_output_pos,
     &free_data_pos,
-    NULL,
+    nullptr,
     &evaluate_pos,
-    NULL,
-    {NULL, NULL, 0, NULL},
+    nullptr,
+    {nullptr, nullptr, 0, nullptr},
 };
 
 /** Selection method data for the \p cog method. */
@@ -166,10 +166,10 @@ gmx_ana_selmethod_t sm_cog = {
     &init_cog,
     &init_output_pos,
     &free_data_pos,
-    NULL,
+    nullptr,
     &evaluate_pos,
-    NULL,
-    {"cog of ATOM_EXPR [pbc]", NULL, 0, NULL},
+    nullptr,
+    {"cog of ATOM_EXPR [pbc]", nullptr, 0, nullptr},
 };
 
 /** Selection method data for the \p com method. */
@@ -181,10 +181,10 @@ gmx_ana_selmethod_t sm_com = {
     &init_com,
     &init_output_pos,
     &free_data_pos,
-    NULL,
+    nullptr,
     &evaluate_pos,
-    NULL,
-    {"com of ATOM_EXPR [pbc]", NULL, 0, NULL},
+    nullptr,
+    {"com of ATOM_EXPR [pbc]", nullptr, 0, nullptr},
 };
 
 /*!
@@ -209,9 +209,9 @@ init_data_pos(int npar, gmx_ana_selparam_t *param)
     {
         param[1].val.u.b = &data->bPBC;
     }
-    data->pc       = NULL;
+    data->pc       = nullptr;
     data->bPBC     = false;
-    data->type     = NULL;
+    data->type     = nullptr;
     data->flags    = -1;
     return data;
 }
@@ -236,7 +236,7 @@ _gmx_selelem_is_default_kwpos(const gmx::SelectionTreeElement &sel)
     }
 
     t_methoddata_pos *d = static_cast<t_methoddata_pos *>(sel.u.expr.mdata);
-    return d->type == NULL;
+    return d->type == nullptr;
 }
 
 /*! \brief