/*
* 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.
: settings_(*settings),
startTime_(0.0), endTime_(0.0), deltaTime_(0.0),
bStartTimeSet_(false), bEndTimeSet_(false), bDeltaTimeSet_(false),
- bTrajOpen_(false), fr(NULL), gpbc_(NULL), status_(NULL), oenv_(NULL)
+ bTrajOpen_(false), fr(nullptr), gpbc_(nullptr), status_(nullptr), oenv_(nullptr)
{
}
{
snew(topInfo_.mtop_, 1);
readConfAndTopology(topfile_.c_str(), &topInfo_.bTop_, topInfo_.mtop_,
- &topInfo_.ePBC_, &topInfo_.xtop_, NULL,
+ &topInfo_.ePBC_, &topInfo_.xtop_, nullptr,
topInfo_.boxtop_);
// TODO: Only load this here if the tool actually needs it; selections
// take care of themselves.
&& !settings_.hasFlag(TrajectoryAnalysisSettings::efUseTopX))
{
sfree(topInfo_.xtop_);
- topInfo_.xtop_ = NULL;
+ topInfo_.xtop_ = nullptr;
}
}
}
TrajectoryAnalysisRunnerCommon::Impl::initFirstFrame()
{
// Return if we have already initialized the trajectory.
- if (fr != NULL)
+ if (fr != nullptr)
{
return;
}
close_trx(status_);
bTrajOpen_ = false;
}
- if (gpbc_ != NULL)
+ if (gpbc_ != nullptr)
{
gmx_rmpbc_done(gpbc_);
- gpbc_ = NULL;
+ gpbc_ = nullptr;
}
}
void
TrajectoryAnalysisRunnerCommon::initFrame()
{
- if (impl_->gpbc_ != NULL)
+ if (impl_->gpbc_ != nullptr)
{
gmx_rmpbc_trxfr(impl_->gpbc_, impl_->fr);
}
t_trxframe &
TrajectoryAnalysisRunnerCommon::frame() const
{
- GMX_RELEASE_ASSERT(impl_->fr != NULL, "Frame not available when accessed");
+ GMX_RELEASE_ASSERT(impl_->fr != nullptr, "Frame not available when accessed");
return *impl_->fr;
}