/*
* 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.
*/
TimeUnitBehavior::TimeUnitBehavior()
- : timeUnit_(TimeUnit_Default), timeUnitStore_(NULL)
+ : timeUnit_(TimeUnit_Default), timeUnitStore_(nullptr)
{
}
GMX_RELEASE_ASSERT(timeUnit >= 0 && timeUnit <= TimeUnit_s,
"Invalid time unit");
timeUnit_ = timeUnit;
- if (timeUnitStore_ != NULL)
+ if (timeUnitStore_ != nullptr)
{
*timeUnitStore_ = timeUnit;
}
void TimeUnitBehavior::setTimeUnitFromEnvironment()
{
const char *const value = std::getenv("GMXTIMEUNIT");
- if (value != NULL)
+ if (value != nullptr)
{
ConstArrayRef<const char *> timeUnits(g_timeUnits);
ConstArrayRef<const char *>::const_iterator i =
double factor = TimeUnitManager(timeUnit()).timeScaleFactor();
TimeOptionScaler<DoubleOptionInfo>(factor).visitSection(&options->rootSection());
TimeOptionScaler<FloatOptionInfo>(factor).visitSection(&options->rootSection());
- if (timeUnitStore_ != NULL)
+ if (timeUnitStore_ != nullptr)
{
*timeUnitStore_ = static_cast<TimeUnit>(timeUnit_);
}