Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / testutils / testinit.cpp
index 5ade1e5a1d373a388a9cd52023682611c1d77c22..751e3e5d18d078a98478f353700f77d7cf1a2b22 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * 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.
@@ -145,7 +145,7 @@ void printHelp(const Options &options)
                  "\nYou can use the following GROMACS-specific command-line flags\n"
                  "to control the behavior of the tests:\n\n");
     TextWriter             writer(&TextOutputFile::standardError());
-    CommandLineHelpContext context(&writer, eHelpOutputFormat_Console, NULL, program);
+    CommandLineHelpContext context(&writer, eHelpOutputFormat_Console, nullptr, program);
     context.setModuleDisplayName(program);
     CommandLineHelpWriter(options).writeHelp(context);
 }
@@ -185,14 +185,14 @@ void initTestUtils(const char *dataPath, const char *tempPath, bool usesMpi,
         setProgramContext(g_testContext.get());
         // Use the default finder that does not respect GMXLIB, since the tests
         // generally can only get confused by a different set of data files.
-        setLibraryFileFinder(NULL);
+        setLibraryFileFinder(nullptr);
         ::testing::InitGoogleMock(argc, *argv);
-        if (dataPath != NULL)
+        if (dataPath != nullptr)
         {
             TestFileManager::setInputDataDirectory(
                     Path::join(CMAKE_SOURCE_DIR, dataPath));
         }
-        if (tempPath != NULL)
+        if (tempPath != nullptr)
         {
             TestFileManager::setGlobalOutputTempDirectory(tempPath);
         }
@@ -256,7 +256,7 @@ void initTestUtils(const char *dataPath, const char *tempPath, bool usesMpi,
 
 void finalizeTestUtils()
 {
-    setProgramContext(NULL);
+    setProgramContext(nullptr);
     g_testContext.reset();
     finalizeForCommandLine();
 }