Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / testutils / refdata-impl.h
index 3ac5b644c9b20d070a038440560d8527386a24f7..144668763cd4fe7d8e8400b51ec759f7f5fc9e24 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -66,8 +66,8 @@ class ReferenceDataEntry
         }
 
         ReferenceDataEntry(const char *type, const char *id)
-            : type_(type), id_(id != NULL ? id : ""), isTextBlock_(false),
-              hasBeenChecked_(false), correspondingOutputEntry_(NULL)
+            : type_(type), id_(id != nullptr ? id : ""), isTextBlock_(false),
+              hasBeenChecked_(false), correspondingOutputEntry_(nullptr)
         {
         }
 
@@ -84,7 +84,7 @@ class ReferenceDataEntry
 
         bool idMatches(const char *id) const
         {
-            return (id == NULL && id_.empty()) || (id != NULL && id_ == id);
+            return (id == nullptr && id_.empty()) || (id != nullptr && id_ == id);
         }
 
         ChildIterator findChild(const char *id, const ChildIterator &prev) const
@@ -97,7 +97,7 @@ class ReferenceDataEntry
             bool           wrappingSearch = true;
             if (child != children_.end())
             {
-                if (id == NULL && (*child)->id().empty())
+                if (id == nullptr && (*child)->id().empty())
                 {
                     wrappingSearch = false;
                     ++child;
@@ -174,7 +174,7 @@ class ReferenceDataEntry
         }
         void setCorrespondingOutputEntry(ReferenceDataEntry *entry)
         {
-            GMX_RELEASE_ASSERT(correspondingOutputEntry_ == NULL,
+            GMX_RELEASE_ASSERT(correspondingOutputEntry_ == nullptr,
                                "Output entry already exists");
             correspondingOutputEntry_ = entry;
         }