Commit 1d6909a2 authored by Daniel Pfeifer's avatar Daniel Pfeifer Committed by Brad King

use CM_NULLPTR

parent b4b73f56
......@@ -101,8 +101,9 @@ int cmCPackIFWGenerator::PackageFiles()
int retVal = 1;
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Generate repository"
<< std::endl);
bool res = cmSystemTools::RunSingleCommand(
ifwCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
bool res = cmSystemTools::RunSingleCommand(ifwCmd.c_str(), &output,
&output, &retVal, CM_NULLPTR,
this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(ifwTmpFile.c_str());
ofs << "# Run command: " << ifwCmd << std::endl
......@@ -178,8 +179,9 @@ int cmCPackIFWGenerator::PackageFiles()
std::string output;
int retVal = 1;
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Generate package" << std::endl);
bool res = cmSystemTools::RunSingleCommand(
ifwCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
bool res = cmSystemTools::RunSingleCommand(ifwCmd.c_str(), &output,
&output, &retVal, CM_NULLPTR,
this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(ifwTmpFile.c_str());
ofs << "# Run command: " << ifwCmd << std::endl
......@@ -526,7 +528,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetGroupPackage(
{
std::map<cmCPackComponentGroup*, cmCPackIFWPackage*>::const_iterator pit =
GroupPackages.find(group);
return pit != GroupPackages.end() ? pit->second : 0;
return pit != GroupPackages.end() ? pit->second : CM_NULLPTR;
}
cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
......@@ -534,7 +536,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
{
std::map<cmCPackComponent*, cmCPackIFWPackage*>::const_iterator pit =
ComponentPackages.find(component);
return pit != ComponentPackages.end() ? pit->second : 0;
return pit != ComponentPackages.end() ? pit->second : CM_NULLPTR;
}
cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
......@@ -556,7 +558,7 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
}
} else {
Repositories.erase(repositoryName);
repository = 0;
repository = CM_NULLPTR;
cmCPackLogger(cmCPackLog::LOG_WARNING, "Invalid repository \""
<< repositoryName << "\""
<< " configuration. Repository will be skipped."
......
......@@ -33,13 +33,13 @@
} while (0)
cmCPackIFWInstaller::cmCPackIFWInstaller()
: Generator(0)
: Generator(CM_NULLPTR)
{
}
const char* cmCPackIFWInstaller::GetOption(const std::string& op) const
{
return Generator ? Generator->GetOption(op) : 0;
return Generator ? Generator->GetOption(op) : CM_NULLPTR;
}
bool cmCPackIFWInstaller::IsOn(const std::string& op) const
......
......@@ -96,15 +96,15 @@ std::string cmCPackIFWPackage::DependenceStruct::NameWithCompare() const
//------------------------------------------------------ cmCPackIFWPackage ---
cmCPackIFWPackage::cmCPackIFWPackage()
: Generator(0)
, Installer(0)
: Generator(CM_NULLPTR)
, Installer(CM_NULLPTR)
{
}
const char* cmCPackIFWPackage::GetOption(const std::string& op) const
{
const char* option = Generator ? Generator->GetOption(op) : 0;
return option && *option ? option : 0;
const char* option = Generator ? Generator->GetOption(op) : CM_NULLPTR;
return option && *option ? option : CM_NULLPTR;
}
bool cmCPackIFWPackage::IsOn(const std::string& op) const
......
......@@ -35,7 +35,7 @@
cmCPackIFWRepository::cmCPackIFWRepository()
: Update(None)
, Generator(0)
, Generator(CM_NULLPTR)
{
}
......@@ -63,7 +63,7 @@ bool cmCPackIFWRepository::IsValid() const
const char* cmCPackIFWRepository::GetOption(const std::string& op) const
{
return Generator ? Generator->GetOption(op) : 0;
return Generator ? Generator->GetOption(op) : CM_NULLPTR;
}
bool cmCPackIFWRepository::IsOn(const std::string& op) const
......
......@@ -68,7 +68,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
++fileIt) {
std::string rp = filePrefix + *fileIt;
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
archive.Add(rp, 0, 0, false);
archive.Add(rp, 0, CM_NULLPTR, false);
if (!archive) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
<< archive.GetError() << std::endl);
......@@ -139,7 +139,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 == NULL) {
if (compIt->second.Group == CM_NULLPTR) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
......@@ -246,7 +246,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, 0, false);
archive.Add(rp, 0, CM_NULLPTR, false);
if (!archive) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem while adding file< "
<< *fileIt << "> to archive <" << packageFileNames[0]
......
......@@ -43,7 +43,7 @@ class cmCPackComponent
{
public:
cmCPackComponent()
: Group(0)
: Group(CM_NULLPTR)
, IsRequired(true)
, IsHidden(false)
, IsDisabledByDefault(false)
......@@ -117,7 +117,7 @@ class cmCPackComponentGroup
{
public:
cmCPackComponentGroup()
: ParentGroup(0)
: ParentGroup(CM_NULLPTR)
{
}
......
......@@ -133,7 +133,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 == NULL) {
if (compIt->second.Group == CM_NULLPTR) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
......@@ -692,7 +692,7 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
if (NULL != GetOption(groupVar)) {
if (CM_NULLPTR != GetOption(groupVar)) {
return std::string(GetOption(groupVar));
} else {
return componentName;
......@@ -917,18 +917,18 @@ static int ar_append(const char* archive,
{
int eval = 0;
FILE* aFile = cmSystemTools::Fopen(archive, "wb+");
if (aFile != NULL) {
if (aFile != CM_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(NULL, 0, aFile, archive, WPAD);
SETCF(CM_NULLPTR, CM_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 == NULL) {
if (file == CM_NULLPTR) {
eval = -1;
continue;
}
......
......@@ -34,14 +34,14 @@
cmCPackGenerator::cmCPackGenerator()
{
this->GeneratorVerbose = cmSystemTools::OUTPUT_NONE;
this->MakefileMap = 0;
this->Logger = 0;
this->MakefileMap = CM_NULLPTR;
this->Logger = CM_NULLPTR;
this->componentPackageMethod = ONE_PACKAGE_PER_GROUP;
}
cmCPackGenerator::~cmCPackGenerator()
{
this->MakefileMap = 0;
this->MakefileMap = CM_NULLPTR;
}
void cmCPackGeneratorProgress(const char* msg, float prog, void* ptr)
......@@ -251,8 +251,9 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << *it << std::endl);
std::string output;
int retVal = 1;
bool resB = cmSystemTools::RunSingleCommand(
it->c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
bool resB =
cmSystemTools::RunSingleCommand(it->c_str(), &output, &output, &retVal,
CM_NULLPTR, this->GeneratorVerbose, 0);
if (!resB || retVal) {
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/InstallOutput.log";
......@@ -814,7 +815,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
}
if (NULL != mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (CM_NULLPTR !=
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (!absoluteDestFiles.empty()) {
absoluteDestFiles += ";";
}
......@@ -828,7 +830,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::string absoluteDestFileComponent =
std::string("CPACK_ABSOLUTE_DESTINATION_FILES") + "_" +
GetComponentInstallDirNameSuffix(installComponent);
if (NULL != this->GetOption(absoluteDestFileComponent)) {
if (CM_NULLPTR != this->GetOption(absoluteDestFileComponent)) {
std::string absoluteDestFilesListComponent =
this->GetOption(absoluteDestFileComponent);
absoluteDestFilesListComponent += ";";
......@@ -1178,7 +1180,7 @@ int cmCPackGenerator::PrepareGroupingKind()
std::string groupingType;
// Second way to specify grouping
if (NULL != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
if (CM_NULLPTR != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING");
}
......@@ -1355,7 +1357,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
component->Group = GetComponentGroup(projectName, groupName);
component->Group->Components.push_back(component);
} else {
component->Group = 0;
component->Group = CM_NULLPTR;
}
const char* description = this->GetOption(macroPrefix + "_DESCRIPTION");
......@@ -1423,7 +1425,7 @@ cmCPackComponentGroup* cmCPackGenerator::GetComponentGroup(
group->ParentGroup = GetComponentGroup(projectName, parentGroupName);
group->ParentGroup->Subgroups.push_back(group);
} else {
group->ParentGroup = 0;
group->ParentGroup = CM_NULLPTR;
}
}
return group;
......
......@@ -136,7 +136,7 @@ protected:
cmInstalledFile const* GetInstalledFile(std::string const& name) const;
virtual const char* GetOutputExtension() { return ".cpack"; }
virtual const char* GetOutputPostfix() { return 0; }
virtual const char* GetOutputPostfix() { return CM_NULLPTR; }
/**
* Prepare requested grouping kind from CPACK_xxx vars
......
......@@ -151,7 +151,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(
{
cmCPackGenerator* gen = this->NewGeneratorInternal(name);
if (!gen) {
return 0;
return CM_NULLPTR;
}
this->Generators.push_back(gen);
gen->SetLogger(this->Logger);
......@@ -164,7 +164,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
cmCPackGeneratorFactory::t_GeneratorCreatorsMap::iterator it =
this->GeneratorCreators.find(name);
if (it == this->GeneratorCreators.end()) {
return 0;
return CM_NULLPTR;
}
return (it->second)();
}
......
......@@ -28,13 +28,13 @@ cmCPackLog::cmCPackLog()
this->DefaultOutput = &std::cout;
this->DefaultError = &std::cerr;
this->LogOutput = 0;
this->LogOutput = CM_NULLPTR;
this->LogOutputCleanup = false;
}
cmCPackLog::~cmCPackLog()
{
this->SetLogOutputStream(0);
this->SetLogOutputStream(CM_NULLPTR);
}
void cmCPackLog::SetLogOutputStream(std::ostream* os)
......@@ -48,13 +48,13 @@ void cmCPackLog::SetLogOutputStream(std::ostream* os)
bool cmCPackLog::SetLogOutputFile(const char* fname)
{
cmGeneratedFileStream* cg = 0;
cmGeneratedFileStream* cg = CM_NULLPTR;
if (fname) {
cg = new cmGeneratedFileStream(fname);
}
if (cg && !*cg) {
delete cg;
cg = 0;
cg = CM_NULLPTR;
}
this->SetLogOutputStream(cg);
if (!cg) {
......
......@@ -212,7 +212,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 == 0) {
if (groupIt->second.ParentGroup == CM_NULLPTR) {
componentCode +=
this->CreateComponentGroupDescription(&groupIt->second, macrosOut);
}
......@@ -301,8 +301,9 @@ int cmCPackNSISGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd << std::endl);
std::string output;
int retVal = 1;
bool res = cmSystemTools::RunSingleCommand(
nsisCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
bool res =
cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &output, &retVal,
CM_NULLPTR, this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Run command: " << nsisCmd << std::endl
......@@ -326,7 +327,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", 0);
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", CM_NULLPTR);
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()"
......@@ -399,8 +400,9 @@ int cmCPackNSISGenerator::InitializeInternal()
<< std::endl);
std::string output;
int retVal = 1;
bool resS = cmSystemTools::RunSingleCommand(
nsisCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
bool resS =
cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &output, &retVal,
CM_NULLPTR, this->GeneratorVerbose, 0);
cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)");
cmsys::RegularExpression versionRexCVS("v(.*)\\.cvs");
if (!resS || retVal ||
......
......@@ -121,7 +121,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 == NULL) {
if (compIt->second.Group == CM_NULLPTR) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
......@@ -245,7 +245,7 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
if (NULL != GetOption(groupVar)) {
if (CM_NULLPTR != GetOption(groupVar)) {
return std::string(GetOption(groupVar));
} else {
return componentName;
......
......@@ -27,13 +27,13 @@
#include <cmsys/SystemTools.hxx>
static const char* cmDocumentationName[][2] = {
{ 0, " cpack - Packaging driver provided by CMake." },
{ 0, 0 }
{ CM_NULLPTR, " cpack - Packaging driver provided by CMake." },
{ CM_NULLPTR, CM_NULLPTR }
};
static const char* cmDocumentationUsage[][2] = {
{ 0, " cpack -G <generator> [options]" },
{ 0, 0 }
{ CM_NULLPTR, " cpack -G <generator> [options]" },
{ CM_NULLPTR, CM_NULLPTR }
};
static const char* cmDocumentationOptions[][2] = {
......@@ -47,7 +47,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" },
{ 0, 0 }
{ CM_NULLPTR, CM_NULLPTR }
};
int cpackUnknownArgument(const char*, void*)
......@@ -200,7 +200,7 @@ int main(int argc, char const* const* argv)
cmCPackGeneratorFactory generators;
generators.SetLogger(&log);
cmCPackGenerator* cpackGenerator = 0;
cmCPackGenerator* cpackGenerator = CM_NULLPTR;
cmDocumentation doc;
doc.addCPackStandardDocSections();
......
......@@ -139,13 +139,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", 0 };
const char* bzr_info[] = { bzr, "info", CM_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", 0 };
const char* bzr_revno[] = { bzr, "revno", CM_NULLPTR };
std::string rev;
RevnoParser rout(this, "revno-out> ", rev);
OutputLogger rerr(this->Log, "revno-err> ");
......@@ -190,7 +190,8 @@ public:
int res = cmXMLParser::InitializeParser();
if (res) {
XML_SetUnknownEncodingHandler(static_cast<XML_Parser>(this->Parser),
cmBZRXMLParserUnknownEncodingHandler, 0);
cmBZRXMLParserUnknownEncodingHandler,
CM_NULLPTR);
}
return res;
}
......@@ -380,7 +381,7 @@ bool cmCTestBZR::UpdateImpl()
bzr_update.push_back(this->URL.c_str());
bzr_update.push_back(0);
bzr_update.push_back(CM_NULLPTR);
// For some reason bzr uses stderr to display the update status.
OutputLogger out(this->Log, "pull-out> ");
......@@ -408,7 +409,8 @@ void 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(), 0
bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(),
CM_NULLPTR
};
{
LogParser out(this, "log-out> ");
......@@ -465,7 +467,7 @@ void cmCTestBZR::LoadModifications()
{
// Run "bzr status" which reports local modifications.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_status[] = { bzr, "status", "-SV", 0 };
const char* bzr_status[] = { bzr, "status", "-SV", CM_NULLPTR };
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(bzr_status, &out, &err);
......
......@@ -72,7 +72,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
args.push_back(toolset);
}
const char* config = 0;
const char* config = CM_NULLPTR;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
......@@ -158,10 +158,10 @@ public:
}
~cmCTestBuildAndTestCaptureRAII()
{
this->CM.SetProgressCallback(0, 0);
cmSystemTools::SetStderrCallback(0, 0);
cmSystemTools::SetStdoutCallback(0, 0);
cmSystemTools::SetMessageCallback(0, 0);
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);
}
};
......@@ -247,7 +247,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
std::string output;
const char* config = 0;
const char* config = CM_NULLPTR;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
......@@ -321,7 +321,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(0);
testCommand.push_back(CM_NULLPTR);
std::string outs;
int retval = 0;
// run the test from the this->BuildRunDir if set
......@@ -347,8 +347,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
int runTestRes =
this->CTest->RunTest(testCommand, &outs, &retval, 0, remainingTime, 0);
int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval,
CM_NULLPTR, remainingTime, CM_NULLPTR);
if (runTestRes != cmsysProcess_State_Exited || retval != 0) {
out << "Test command failed: " << testCommand[0] << "\n";
......
......@@ -19,14 +19,14 @@
cmCTestBuildCommand::cmCTestBuildCommand()
{
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_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] = 0;
this->Arguments[ctb_LAST] = CM_NULLPTR;
this->Last = ctb_LAST;
}
......@@ -34,7 +34,7 @@ cmCTestBuildCommand::~cmCTestBuildCommand()
{
if (this->GlobalGenerator) {
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_NULLPTR;
}
}
......@@ -43,7 +43,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("build");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate build handler");
return 0;
return CM_NULLPTR;
}
this->Handler = (cmCTestBuildHandler*)handler;
......@@ -91,7 +91,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
if (this->GlobalGenerator) {
if (this->GlobalGenerator->GetName() != cmakeGeneratorName) {
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_NULLPTR;
}
}
if (!this->GlobalGenerator) {
......@@ -104,11 +104,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
e += "\"";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
cmSystemTools::SetFatalErrorOccured();
return 0;
return CM_NULLPTR;
}
}
if (strlen(cmakeBuildConfiguration) == 0) {
const char* config = 0;
const char* config = CM_NULLPTR;
#ifdef CMAKE_INTDIR
config = CMAKE_INTDIR;
#endif
......@@ -145,7 +145,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
"with a custom command line.";
/* clang-format on */
this->SetError(ostr.str());
return 0;
return CM_NULLPTR;
}
}
......
......@@ -92,7 +92,7 @@ static const char* cmCTestErrorMatches[] = {
"^The project cannot be built\\.",
"^\\[ERROR\\]",
"^Command .* failed with exit code",
0
CM_NULLPTR
};
static const char* cmCTestErrorExceptions[] = {
......@@ -107,7 +107,7 @@ static const char* cmCTestErrorExceptions[] = {
":[ \\t]+Where:",
"([^ :]+):([0-9]+): Warning",
"------ Build started: .* ------",
0
CM_NULLPTR
};
static const char* cmCTestWarningMatches[] = {
......@@ -132,7 +132,7 @@ static const char* cmCTestWarningMatches[] = {
"cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*",
"^CMake Warning.*:",
"^\\[WARNING\\]",
0
CM_NULLPTR
};