/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 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.
*/
AnalysisDataPlotSettings::AnalysisDataPlotSettings()
- : selections_(NULL), timeUnit_(TimeUnit_Default), plotFormat_(1)
+ : selections_(nullptr), timeUnit_(TimeUnit_Default), plotFormat_(1)
{
}
};
AbstractPlotModule::Impl::Impl(const AnalysisDataPlotSettings &settings)
- : settings_(settings), fp_(NULL), bPlain_(false), bOmitX_(false),
+ : settings_(settings), fp_(nullptr), bPlain_(false), bOmitX_(false),
bErrorsAsSeparateColumn_(false), xscale_(1.0)
{
strcpy(xformat_, "%11.3f");
void
AbstractPlotModule::Impl::closeFile()
{
- if (fp_ != NULL)
+ if (fp_ != nullptr)
{
if (bPlain_)
{
{
xvgrclose(fp_);
}
- fp_ = NULL;
+ fp_ = nullptr;
}
}
GMX_RELEASE_ASSERT(width >= 0 && precision >= 0
&& width <= 99 && precision <= 99,
"Invalid width or precision");
- GMX_RELEASE_ASSERT(strchr("eEfFgG", format) != NULL,
+ GMX_RELEASE_ASSERT(strchr("eEfFgG", format) != nullptr,
"Invalid format specifier");
sprintf(impl_->xformat_, "%%%d.%d%c", width, precision, format);
}
GMX_RELEASE_ASSERT(width >= 0 && precision >= 0
&& width <= 99 && precision <= 99,
"Invalid width or precision");
- GMX_RELEASE_ASSERT(strchr("eEfFgG", format) != NULL,
+ GMX_RELEASE_ASSERT(strchr("eEfFgG", format) != nullptr,
"Invalid format specifier");
sprintf(impl_->yformat_, " %%%d.%d%c", width, precision, format);
}
oenv);
const SelectionCollection *selections
= impl_->settings_.selectionCollection();
- if (selections != NULL && output_env_get_xvg_format(oenv) != exvgNONE)
+ if (selections != nullptr && output_env_get_xvg_format(oenv) != exvgNONE)
{
selections->printXvgrInfo(impl_->fp_);
}
bool
AbstractPlotModule::isFileOpen() const
{
- return impl_->fp_ != NULL;
+ return impl_->fp_ != nullptr;
}