Commit 5962db43 authored by Daniel Pfeifer's avatar Daniel Pfeifer

Use C++11 nullptr

parent fe19fda2
......@@ -24,7 +24,4 @@ readability-*,\
-readability-simplify-boolean-expr,\
"
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
CheckOptions:
- key: modernize-use-nullptr.NullMacros
value: 'CM_NULLPTR'
...
......@@ -15,14 +15,14 @@
#include <vector>
cmCPackIFWCommon::cmCPackIFWCommon()
: Generator(CM_NULLPTR)
: Generator(nullptr)
{
}
const char* cmCPackIFWCommon::GetOption(const std::string& op) const
{
return this->Generator ? this->Generator->cmCPackGenerator::GetOption(op)
: CM_NULLPTR;
: nullptr;
}
bool cmCPackIFWCommon::IsOn(const std::string& op) const
......
......@@ -73,7 +73,7 @@ int cmCPackIFWGenerator::PackageFiles()
int retVal = 1;
cmCPackIFWLogger(OUTPUT, "- Generate repository" << std::endl);
bool res = cmSystemTools::RunSingleCommand(ifwCmd.c_str(), &output,
&output, &retVal, CM_NULLPTR,
&output, &retVal, nullptr,
this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(ifwTmpFile.c_str());
......@@ -171,7 +171,7 @@ int cmCPackIFWGenerator::PackageFiles()
int retVal = 1;
cmCPackIFWLogger(OUTPUT, "- Generate package" << std::endl);
bool res = cmSystemTools::RunSingleCommand(ifwCmd.c_str(), &output,
&output, &retVal, CM_NULLPTR,
&output, &retVal, nullptr,
this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(ifwTmpFile.c_str());
......@@ -534,7 +534,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetGroupPackage(
{
std::map<cmCPackComponentGroup*, cmCPackIFWPackage*>::const_iterator pit =
this->GroupPackages.find(group);
return pit != this->GroupPackages.end() ? pit->second : CM_NULLPTR;
return pit != this->GroupPackages.end() ? pit->second : nullptr;
}
cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
......@@ -542,7 +542,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
{
std::map<cmCPackComponent*, cmCPackIFWPackage*>::const_iterator pit =
this->ComponentPackages.find(component);
return pit != this->ComponentPackages.end() ? pit->second : CM_NULLPTR;
return pit != this->ComponentPackages.end() ? pit->second : nullptr;
}
cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
......@@ -564,7 +564,7 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
}
} else {
this->Repositories.erase(repositoryName);
repository = CM_NULLPTR;
repository = nullptr;
cmCPackIFWLogger(WARNING, "Invalid repository \""
<< repositoryName << "\""
<< " configuration. Repository will be skipped."
......
......@@ -92,7 +92,7 @@ std::string cmCPackIFWPackage::DependenceStruct::NameWithCompare() const
//------------------------------------------------------ cmCPackIFWPackage ---
cmCPackIFWPackage::cmCPackIFWPackage()
: Installer(CM_NULLPTR)
: Installer(nullptr)
{
}
......
......@@ -72,7 +72,7 @@ void cmWIXPatchParser::StartElement(const std::string& name, const char** atts)
void cmWIXPatchParser::StartFragment(const char** attributes)
{
cmWIXPatchElement* new_element = CM_NULLPTR;
cmWIXPatchElement* new_element = nullptr;
/* find the id of for fragment */
for (size_t i = 0; attributes[i]; i += 2) {
const std::string key = attributes[i];
......
......@@ -79,7 +79,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
++fileIt) {
std::string rp = filePrefix + *fileIt;
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
archive.Add(rp, 0, CM_NULLPTR, false);
archive.Add(rp, 0, nullptr, false);
if (!archive) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
<< archive.GetError() << std::endl);
......@@ -146,7 +146,7 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
if (compIt->second.Group == CM_NULLPTR) {
if (compIt->second.Group == nullptr) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
......@@ -255,7 +255,7 @@ int cmCPackArchiveGenerator::PackageFiles()
// Get the relative path to the file
std::string rp =
cmSystemTools::RelativePath(toplevel.c_str(), fileIt->c_str());
archive.Add(rp, 0, CM_NULLPTR, false);
archive.Add(rp, 0, nullptr, false);
if (!archive) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem while adding file< "
<< *fileIt << "> to archive <" << packageFileNames[0]
......
......@@ -36,7 +36,7 @@ class cmCPackComponent
{
public:
cmCPackComponent()
: Group(CM_NULLPTR)
: Group(nullptr)
, IsRequired(true)
, IsHidden(false)
, IsDisabledByDefault(false)
......@@ -114,7 +114,7 @@ class cmCPackComponentGroup
{
public:
cmCPackComponentGroup()
: ParentGroup(CM_NULLPTR)
: ParentGroup(nullptr)
{
}
......
......@@ -129,7 +129,7 @@ int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
if (compIt->second.Group == CM_NULLPTR) {
if (compIt->second.Group == nullptr) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
......@@ -713,7 +713,7 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
if (CM_NULLPTR != GetOption(groupVar)) {
if (nullptr != GetOption(groupVar)) {
return std::string(GetOption(groupVar));
}
return componentName;
......@@ -928,18 +928,18 @@ static int ar_append(const char* archive,
{
int eval = 0;
FILE* aFile = cmSystemTools::Fopen(archive, "wb+");
if (aFile != CM_NULLPTR) {
if (aFile != nullptr) {
fwrite(ARMAG, SARMAG, 1, aFile);
if (fseek(aFile, 0, SEEK_END) != -1) {
CF cf;
struct stat sb;
/* Read from disk, write to an archive; pad on write. */
SETCF(CM_NULLPTR, CM_NULLPTR, aFile, archive, WPAD);
SETCF(nullptr, nullptr, aFile, archive, WPAD);
for (std::vector<std::string>::const_iterator fileIt = files.begin();
fileIt != files.end(); ++fileIt) {
const char* filename = fileIt->c_str();
FILE* file = cmSystemTools::Fopen(filename, "rb");
if (file == CM_NULLPTR) {
if (file == nullptr) {
eval = -1;
continue;
}
......
......@@ -28,14 +28,14 @@
cmCPackGenerator::cmCPackGenerator()
{
this->GeneratorVerbose = cmSystemTools::OUTPUT_NONE;
this->MakefileMap = CM_NULLPTR;
this->Logger = CM_NULLPTR;
this->MakefileMap = nullptr;
this->Logger = nullptr;
this->componentPackageMethod = ONE_PACKAGE_PER_GROUP;
}
cmCPackGenerator::~cmCPackGenerator()
{
this->MakefileMap = CM_NULLPTR;
this->MakefileMap = nullptr;
}
void cmCPackGeneratorProgress(const char* msg, float prog, void* ptr)
......@@ -156,7 +156,7 @@ int cmCPackGenerator::PrepareNames()
}
const char* algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM");
if (algoSignature) {
if (cmCryptoHash::New(algoSignature).get() == CM_NULLPTR) {
if (cmCryptoHash::New(algoSignature).get() == nullptr) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot recognize algorithm: "
<< algoSignature << std::endl);
return 0;
......@@ -256,7 +256,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
int retVal = 1;
bool resB =
cmSystemTools::RunSingleCommand(it->c_str(), &output, &output, &retVal,
CM_NULLPTR, this->GeneratorVerbose, 0);
nullptr, this->GeneratorVerbose, 0);
if (!resB || retVal) {
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/InstallOutput.log";
......@@ -820,8 +820,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
}
if (CM_NULLPTR !=
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (nullptr != mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (!absoluteDestFiles.empty()) {
absoluteDestFiles += ";";
}
......@@ -835,7 +834,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::string absoluteDestFileComponent =
std::string("CPACK_ABSOLUTE_DESTINATION_FILES") + "_" +
GetComponentInstallDirNameSuffix(installComponent);
if (CM_NULLPTR != this->GetOption(absoluteDestFileComponent)) {
if (nullptr != this->GetOption(absoluteDestFileComponent)) {
std::string absoluteDestFilesListComponent =
this->GetOption(absoluteDestFileComponent);
absoluteDestFilesListComponent += ";";
......@@ -1016,7 +1015,7 @@ int cmCPackGenerator::DoPackage()
<< packageFileName << " generated." << std::endl);
/* Generate checksum file */
if (crypto.get() != CM_NULLPTR) {
if (crypto.get() != nullptr) {
std::string hashFile(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
hashFile +=
"/" + filename.substr(0, filename.rfind(this->GetOutputExtension()));
......@@ -1225,7 +1224,7 @@ int cmCPackGenerator::PrepareGroupingKind()
std::string groupingType;
// Second way to specify grouping
if (CM_NULLPTR != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
if (nullptr != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING");
}
......@@ -1407,7 +1406,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
component->Group = GetComponentGroup(projectName, groupName);
component->Group->Components.push_back(component);
} else {
component->Group = CM_NULLPTR;
component->Group = nullptr;
}
const char* description = this->GetOption(macroPrefix + "_DESCRIPTION");
......@@ -1475,7 +1474,7 @@ cmCPackComponentGroup* cmCPackGenerator::GetComponentGroup(
group->ParentGroup = GetComponentGroup(projectName, parentGroupName);
group->ParentGroup->Subgroups.push_back(group);
} else {
group->ParentGroup = CM_NULLPTR;
group->ParentGroup = nullptr;
}
}
return group;
......
......@@ -105,7 +105,7 @@ protected:
cmInstalledFile const* GetInstalledFile(std::string const& name) const;
virtual const char* GetOutputExtension() { return ".cpack"; }
virtual const char* GetOutputPostfix() { return CM_NULLPTR; }
virtual const char* GetOutputPostfix() { return nullptr; }
/**
* Prepare requested grouping kind from CPACK_xxx vars
......
......@@ -153,7 +153,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(
{
cmCPackGenerator* gen = this->NewGeneratorInternal(name);
if (!gen) {
return CM_NULLPTR;
return nullptr;
}
this->Generators.push_back(gen);
gen->SetLogger(this->Logger);
......@@ -166,7 +166,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
cmCPackGeneratorFactory::t_GeneratorCreatorsMap::iterator it =
this->GeneratorCreators.find(name);
if (it == this->GeneratorCreators.end()) {
return CM_NULLPTR;
return nullptr;
}
return (it->second)();
}
......
......@@ -19,13 +19,13 @@ cmCPackLog::cmCPackLog()
this->DefaultOutput = &std::cout;
this->DefaultError = &std::cerr;
this->LogOutput = CM_NULLPTR;
this->LogOutput = nullptr;
this->LogOutputCleanup = false;
}
cmCPackLog::~cmCPackLog()
{
this->SetLogOutputStream(CM_NULLPTR);
this->SetLogOutputStream(nullptr);
}
void cmCPackLog::SetLogOutputStream(std::ostream* os)
......@@ -39,13 +39,13 @@ void cmCPackLog::SetLogOutputStream(std::ostream* os)
bool cmCPackLog::SetLogOutputFile(const char* fname)
{
cmGeneratedFileStream* cg = CM_NULLPTR;
cmGeneratedFileStream* cg = nullptr;
if (fname) {
cg = new cmGeneratedFileStream(fname);
}
if (cg && !*cg) {
delete cg;
cg = CM_NULLPTR;
cg = nullptr;
}
this->SetLogOutputStream(cg);
if (!cg) {
......
......@@ -222,7 +222,7 @@ int cmCPackNSISGenerator::PackageFiles()
std::map<std::string, cmCPackComponentGroup>::iterator groupIt;
for (groupIt = this->ComponentGroups.begin();
groupIt != this->ComponentGroups.end(); ++groupIt) {
if (groupIt->second.ParentGroup == CM_NULLPTR) {
if (groupIt->second.ParentGroup == nullptr) {
componentCode +=
this->CreateComponentGroupDescription(&groupIt->second, macrosOut);
}
......@@ -313,7 +313,7 @@ int cmCPackNSISGenerator::PackageFiles()
int retVal = 1;
bool res =
cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &output, &retVal,
CM_NULLPTR, this->GeneratorVerbose, 0);
nullptr, this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Run command: " << nsisCmd << std::endl
......@@ -337,7 +337,7 @@ int cmCPackNSISGenerator::InitializeInternal()
"NSIS Generator cannot work with CPACK_INCLUDE_TOPLEVEL_DIRECTORY set. "
"This option will be reset to 0 (for this generator only)."
<< std::endl);
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", CM_NULLPTR);
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", nullptr);
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()"
......@@ -412,7 +412,7 @@ int cmCPackNSISGenerator::InitializeInternal()
int retVal = 1;
bool resS =
cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &output, &retVal,
CM_NULLPTR, this->GeneratorVerbose, 0);
nullptr, this->GeneratorVerbose, 0);
cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)");
cmsys::RegularExpression versionRexCVS("v(.*)\\.cvs");
if (!resS || retVal ||
......
......@@ -148,7 +148,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin();
compIt != this->Components.end(); ++compIt) {
// Does the component belong to a group?
if (compIt->second.Group == CM_NULLPTR) {
if (compIt->second.Group == nullptr) {
std::string component(compIt->first);
std::transform(component.begin(), component.end(),
component.begin(), ::toupper);
......@@ -214,7 +214,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
if (compIt->second.Group == CM_NULLPTR) {
if (compIt->second.Group == nullptr) {
std::string component(compIt->first);
std::transform(component.begin(), component.end(), component.begin(),
::toupper);
......@@ -299,7 +299,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
if (compIt->second.Group == CM_NULLPTR) {
if (compIt->second.Group == nullptr) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
......@@ -430,7 +430,7 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
if (CM_NULLPTR != GetOption(groupVar)) {
if (nullptr != GetOption(groupVar)) {
return std::string(GetOption(groupVar));
}
return componentName;
......
......@@ -29,13 +29,13 @@
#include "cmake.h"
static const char* cmDocumentationName[][2] = {
{ CM_NULLPTR, " cpack - Packaging driver provided by CMake." },
{ CM_NULLPTR, CM_NULLPTR }
{ nullptr, " cpack - Packaging driver provided by CMake." },
{ nullptr, nullptr }
};
static const char* cmDocumentationUsage[][2] = {
{ CM_NULLPTR, " cpack -G <generator> [options]" },
{ CM_NULLPTR, CM_NULLPTR }
{ nullptr, " cpack -G <generator> [options]" },
{ nullptr, nullptr }
};
static const char* cmDocumentationOptions[][2] = {
......@@ -49,7 +49,7 @@ static const char* cmDocumentationOptions[][2] = {
{ "-R <package version>", "override/define CPACK_PACKAGE_VERSION" },
{ "-B <package directory>", "override/define CPACK_PACKAGE_DIRECTORY" },
{ "--vendor <vendor name>", "override/define CPACK_PACKAGE_VENDOR" },
{ CM_NULLPTR, CM_NULLPTR }
{ nullptr, nullptr }
};
int cpackUnknownArgument(const char* /*unused*/, void* /*unused*/)
......@@ -208,7 +208,7 @@ int main(int argc, char const* const* argv)
cmCPackGeneratorFactory generators;
generators.SetLogger(&log);
cmCPackGenerator* cpackGenerator = CM_NULLPTR;
cmCPackGenerator* cpackGenerator = nullptr;
cmDocumentation doc;
doc.addCPackStandardDocSections();
......
......@@ -136,13 +136,13 @@ std::string cmCTestBZR::LoadInfo()
{
// Run "bzr info" to get the repository info from the work tree.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_info[] = { bzr, "info", CM_NULLPTR };
const char* bzr_info[] = { bzr, "info", nullptr };
InfoParser iout(this, "info-out> ");
OutputLogger ierr(this->Log, "info-err> ");
this->RunChild(bzr_info, &iout, &ierr);
// Run "bzr revno" to get the repository revision number from the work tree.
const char* bzr_revno[] = { bzr, "revno", CM_NULLPTR };
const char* bzr_revno[] = { bzr, "revno", nullptr };
std::string rev;
RevnoParser rout(this, "revno-out> ", rev);
OutputLogger rerr(this->Log, "revno-err> ");
......@@ -190,7 +190,7 @@ public:
if (res) {
XML_SetUnknownEncodingHandler(static_cast<XML_Parser>(this->Parser),
cmBZRXMLParserUnknownEncodingHandler,
CM_NULLPTR);
nullptr);
}
return res;
}
......@@ -380,7 +380,7 @@ bool cmCTestBZR::UpdateImpl()
bzr_update.push_back(this->URL.c_str());
bzr_update.push_back(CM_NULLPTR);
bzr_update.push_back(nullptr);
// For some reason bzr uses stderr to display the update status.
OutputLogger out(this->Log, "pull-out> ");
......@@ -408,8 +408,7 @@ bool cmCTestBZR::LoadRevisions()
// Run "bzr log" to get all global revisions of interest.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_log[] = {
bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(),
CM_NULLPTR
bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(), nullptr
};
{
LogParser out(this, "log-out> ");
......@@ -467,7 +466,7 @@ bool cmCTestBZR::LoadModifications()
{
// Run "bzr status" which reports local modifications.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_status[] = { bzr, "status", "-SV", CM_NULLPTR };
const char* bzr_status[] = { bzr, "status", "-SV", nullptr };
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(bzr_status, &out, &err);
......
......@@ -65,7 +65,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
args.push_back(toolset);
}
const char* config = CM_NULLPTR;
const char* config = nullptr;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
......@@ -148,10 +148,10 @@ public:
}
~cmCTestBuildAndTestCaptureRAII()
{
this->CM.SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
cmSystemTools::SetStderrCallback(CM_NULLPTR, CM_NULLPTR);
cmSystemTools::SetStdoutCallback(CM_NULLPTR, CM_NULLPTR);
cmSystemTools::SetMessageCallback(CM_NULLPTR, CM_NULLPTR);
this->CM.SetProgressCallback(nullptr, nullptr);
cmSystemTools::SetStderrCallback(nullptr, nullptr);
cmSystemTools::SetStdoutCallback(nullptr, nullptr);
cmSystemTools::SetMessageCallback(nullptr, nullptr);
}
};
......@@ -236,7 +236,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
std::string output;
const char* config = CM_NULLPTR;
const char* config = nullptr;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
......@@ -308,7 +308,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
for (size_t k = 0; k < this->TestCommandArgs.size(); ++k) {
testCommand.push_back(this->TestCommandArgs[k].c_str());
}
testCommand.push_back(CM_NULLPTR);
testCommand.push_back(nullptr);
std::string outs;
int retval = 0;
// run the test from the this->BuildRunDir if set
......@@ -334,8 +334,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval,
CM_NULLPTR, remainingTime, CM_NULLPTR);
int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, nullptr,
remainingTime, nullptr);
if (runTestRes != cmsysProcess_State_Exited || retval != 0) {
out << "Test command failed: " << testCommand[0] << "\n";
......
......@@ -17,14 +17,14 @@ class cmExecutionStatus;
cmCTestBuildCommand::cmCTestBuildCommand()
{
this->GlobalGenerator = CM_NULLPTR;
this->GlobalGenerator = nullptr;
this->Arguments[ctb_NUMBER_ERRORS] = "NUMBER_ERRORS";
this->Arguments[ctb_NUMBER_WARNINGS] = "NUMBER_WARNINGS";
this->Arguments[ctb_TARGET] = "TARGET";
this->Arguments[ctb_CONFIGURATION] = "CONFIGURATION";
this->Arguments[ctb_FLAGS] = "FLAGS";
this->Arguments[ctb_PROJECT_NAME] = "PROJECT_NAME";
this->Arguments[ctb_LAST] = CM_NULLPTR;
this->Arguments[ctb_LAST] = nullptr;
this->Last = ctb_LAST;
}
......@@ -32,7 +32,7 @@ cmCTestBuildCommand::~cmCTestBuildCommand()
{
if (this->GlobalGenerator) {
delete this->GlobalGenerator;
this->GlobalGenerator = CM_NULLPTR;
this->GlobalGenerator = nullptr;
}
}
......@@ -41,7 +41,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("build");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate build handler");
return CM_NULLPTR;
return nullptr;
}
this->Handler = (cmCTestBuildHandler*)handler;
......@@ -89,7 +89,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
if (this->GlobalGenerator) {
if (this->GlobalGenerator->GetName() != cmakeGeneratorName) {
delete this->GlobalGenerator;
this->GlobalGenerator = CM_NULLPTR;
this->GlobalGenerator = nullptr;
}
}
if (!this->GlobalGenerator) {
......@@ -102,11 +102,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
e += "\"";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
cmSystemTools::SetFatalErrorOccured();
return CM_NULLPTR;
return nullptr;
}
}
if (strlen(cmakeBuildConfiguration) == 0) {
const char* config = CM_NULLPTR;
const char* config = nullptr;
#ifdef CMAKE_INTDIR
config = CMAKE_INTDIR;
#endif
......@@ -143,7 +143,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
"with a custom command line.";
/* clang-format on */
this->SetError(ostr.str());
return CM_NULLPTR;
return nullptr;
}
}
......
......@@ -74,7 +74,7 @@ static const char* cmCTestErrorMatches[] = {
"^The project cannot be built\\.",