/*
* 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.
for (size_t i = 0; i < count; ++i)
{
char *arg = strdup(cmdline[i]);
- if (arg == NULL)
+ if (arg == nullptr)
{
throw std::bad_alloc();
}
args_.push_back(arg);
argv_.push_back(arg);
}
- argv_.push_back(NULL);
+ argv_.push_back(nullptr);
}
CommandLine::Impl::~Impl()
*/
CommandLine::CommandLine()
- : impl_(new Impl(NULL, 0))
+ : impl_(new Impl(nullptr, 0))
{
}
impl_->args_.reserve(newSize);
impl_->argv_.reserve(newSize + 1);
char *newArg = strdup(arg);
- if (newArg == NULL)
+ if (newArg == nullptr)
{
throw std::bad_alloc();
}
impl_->args_.push_back(newArg);
impl_->argv_.pop_back(); // Remove the trailing NULL.
impl_->argv_.push_back(newArg);
- impl_->argv_.push_back(NULL);
+ impl_->argv_.push_back(nullptr);
impl_->argc_ = static_cast<int>(newSize);
}
{
// The name and description are not used in the tests, so they can be NULL.
const std::unique_ptr<ICommandLineModule> wrapperModule(
- ICommandLineOptionsModule::createModule(NULL, NULL, std::move(module)));
+ ICommandLineOptionsModule::createModule(nullptr, nullptr, std::move(module)));
return runModuleDirect(wrapperModule.get(), commandLine);
}