mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 11:39:48 +00:00
Use C++11 nullptr
This commit is contained in:
parent
fe19fda2aa
commit
5962db4389
@ -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\\.",
|
||||
"^\\[ERROR\\]",
|
||||
"^Command .* failed with exit code",
|
||||
CM_NULLPTR
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const char* cmCTestErrorExceptions[] = {
|
||||
@ -89,7 +89,7 @@ static const char* cmCTestErrorExceptions[] = {
|
||||
":[ \\t]+Where:",
|
||||
"([^ :]+):([0-9]+): Warning",
|
||||
"------ Build started: .* ------",
|
||||
CM_NULLPTR
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const char* cmCTestWarningMatches[] = {
|
||||
@ -114,7 +114,7 @@ static const char* cmCTestWarningMatches[] = {
|
||||
"cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*",
|
||||
"^CMake Warning.*:",
|
||||
"^\\[WARNING\\]",
|
||||
CM_NULLPTR
|
||||
nullptr
|
||||
};
|
||||
|
||||
static const char* cmCTestWarningExceptions[] = {
|
||||
@ -134,7 +134,7 @@ static const char* cmCTestWarningExceptions[] = {
|
||||
"ld32: WARNING 85: definition of dataKey in",
|
||||
"cc: warning 422: Unknown option \"\\+b",
|
||||
"_with_warning_C",
|
||||
CM_NULLPTR
|
||||
nullptr
|
||||
};
|
||||
|
||||
struct cmCTestBuildCompileErrorWarningRex
|
||||
@ -152,7 +152,7 @@ static cmCTestBuildCompileErrorWarningRex cmCTestWarningErrorFileLine[] = {
|
||||
{ "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
|
||||
{ "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 },
|
||||
{ "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2 },
|
||||
{ CM_NULLPTR, 0, 0 }
|
||||
{ nullptr, 0, 0 }
|
||||
};
|
||||
|
||||
cmCTestBuildHandler::cmCTestBuildHandler()
|
||||
@ -504,7 +504,7 @@ public:
|
||||
{
|
||||
}
|
||||
FragmentCompare()
|
||||
: FTC(CM_NULLPTR)
|
||||
: FTC(nullptr)
|
||||
{
|
||||
}
|
||||
bool operator()(std::string const& l, std::string const& r) const
|
||||
@ -781,7 +781,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
a != args.end(); ++a) {
|
||||
argv.push_back(a->c_str());
|
||||
}
|
||||
argv.push_back(CM_NULLPTR);
|
||||
argv.push_back(nullptr);
|
||||
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
|
||||
this->Quiet);
|
||||
@ -835,7 +835,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
|
||||
// For every chunk of data
|
||||
int res;
|
||||
while ((res = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR))) {
|
||||
while ((res = cmsysProcess_WaitForData(cp, &data, &length, nullptr))) {
|
||||
// Replace '\0' with '\n', since '\0' does not really make sense. This is
|
||||
// for Visual Studio output
|
||||
for (int cc = 0; cc < length; ++cc) {
|
||||
@ -866,9 +866,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
&this->BuildProcessingQueue);
|
||||
}
|
||||
|
||||
this->ProcessBuffer(CM_NULLPTR, 0, tick, tick_len, ofs,
|
||||
this->ProcessBuffer(nullptr, 0, tick, tick_len, ofs,
|
||||
&this->BuildProcessingQueue);
|
||||
this->ProcessBuffer(CM_NULLPTR, 0, tick, tick_len, ofs,
|
||||
this->ProcessBuffer(nullptr, 0, tick, tick_len, ofs,
|
||||
&this->BuildProcessingErrorQueue);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size of output: "
|
||||
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
|
||||
@ -876,7 +876,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
this->Quiet);
|
||||
|
||||
// Properly handle output of the build command
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
int result = cmsysProcess_GetState(cp);
|
||||
|
||||
if (result == cmsysProcess_State_Exited) {
|
||||
|
@ -96,7 +96,7 @@ bool cmCTestCVS::UpdateImpl()
|
||||
ai != args.end(); ++ai) {
|
||||
cvs_update.push_back(ai->c_str());
|
||||
}
|
||||
cvs_update.push_back(CM_NULLPTR);
|
||||
cvs_update.push_back(nullptr);
|
||||
|
||||
UpdateParser out(this, "up-out> ");
|
||||
UpdateParser err(this, "up-err> ");
|
||||
@ -221,8 +221,9 @@ void cmCTestCVS::LoadRevisions(std::string const& file, const char* branchFlag,
|
||||
|
||||
// Run "cvs log" to get revisions of this file on this branch.
|
||||
const char* cvs = this->CommandLineTool.c_str();
|
||||
const char* cvs_log[] = { cvs, "log", "-N",
|
||||
branchFlag, file.c_str(), CM_NULLPTR };
|
||||
const char* cvs_log[] = {
|
||||
cvs, "log", "-N", branchFlag, file.c_str(), nullptr
|
||||
};
|
||||
|
||||
LogParser out(this, "log-out> ", revisions);
|
||||
OutputLogger err(this->Log, "log-err> ");
|
||||
|
@ -20,8 +20,8 @@ class cmCTestCommand : public cmCommand
|
||||
public:
|
||||
cmCTestCommand()
|
||||
{
|
||||
this->CTest = CM_NULLPTR;
|
||||
this->CTestScriptHandler = CM_NULLPTR;
|
||||
this->CTest = nullptr;
|
||||
this->CTestScriptHandler = nullptr;
|
||||
}
|
||||
|
||||
cmCTest* CTest;
|
||||
|
@ -16,7 +16,7 @@
|
||||
cmCTestConfigureCommand::cmCTestConfigureCommand()
|
||||
{
|
||||
this->Arguments[ctc_OPTIONS] = "OPTIONS";
|
||||
this->Arguments[ctc_LAST] = CM_NULLPTR;
|
||||
this->Arguments[ctc_LAST] = nullptr;
|
||||
this->Last = ctc_LAST;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
"Build directory not specified. Either use BUILD "
|
||||
"argument to CTEST_CONFIGURE command or set CTEST_BINARY_DIRECTORY "
|
||||
"variable");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char* ctestConfigureCommand =
|
||||
@ -53,7 +53,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
"Source directory not specified. Either use SOURCE "
|
||||
"argument to CTEST_CONFIGURE command or set CTEST_SOURCE_DIRECTORY "
|
||||
"variable");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::string cmakelists_file = source_dir + "/CMakeLists.txt";
|
||||
@ -61,7 +61,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
std::ostringstream e;
|
||||
e << "CMakeLists.txt file does not exist [" << cmakelists_file << "]";
|
||||
this->SetError(e.str());
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool multiConfig = false;
|
||||
@ -88,9 +88,8 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
cmakeConfigureCommand += option;
|
||||
cmakeConfigureCommand += "\"";
|
||||
|
||||
if ((CM_NULLPTR != strstr(option.c_str(), "CMAKE_BUILD_TYPE=")) ||
|
||||
(CM_NULLPTR !=
|
||||
strstr(option.c_str(), "CMAKE_BUILD_TYPE:STRING="))) {
|
||||
if ((nullptr != strstr(option.c_str(), "CMAKE_BUILD_TYPE=")) ||
|
||||
(nullptr != strstr(option.c_str(), "CMAKE_BUILD_TYPE:STRING="))) {
|
||||
cmakeBuildTypeInOptions = true;
|
||||
}
|
||||
}
|
||||
@ -137,7 +136,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
"Configure command is not specified. If this is a "
|
||||
"\"built with CMake\" project, set CTEST_CMAKE_GENERATOR. If not, "
|
||||
"set CTEST_CONFIGURE_COMMAND.");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,7 +151,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
if (!handler) {
|
||||
this->SetError(
|
||||
"internal CTest error. Cannot instantiate configure handler");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
handler->SetQuiet(this->Quiet);
|
||||
return handler;
|
||||
|
@ -23,7 +23,7 @@ cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
|
||||
this->CTest->GetInitializedHandler("coverage"));
|
||||
if (!handler) {
|
||||
this->SetError("internal CTest error. Cannot instantiate test handler");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// If a LABELS option was given, select only files with the labels.
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
i != this->CommandLineStrings.end(); ++i) {
|
||||
args.push_back(i->c_str());
|
||||
}
|
||||
args.push_back(CM_NULLPTR); // null terminate
|
||||
args.push_back(nullptr); // null terminate
|
||||
cmsysProcess_SetCommand(this->Process, &*args.begin());
|
||||
if (!this->WorkingDirectory.empty()) {
|
||||
cmsysProcess_SetWorkingDirectory(this->Process,
|
||||
@ -97,7 +97,7 @@ public:
|
||||
{
|
||||
cmsysProcess_SetPipeFile(this->Process, cmsysProcess_Pipe_STDERR, fname);
|
||||
}
|
||||
int WaitForExit(double* timeout = CM_NULLPTR)
|
||||
int WaitForExit(double* timeout = nullptr)
|
||||
{
|
||||
this->PipeState = cmsysProcess_WaitForExit(this->Process, timeout);
|
||||
return this->PipeState;
|
||||
@ -1759,7 +1759,7 @@ const char* bullseyeHelp[] = {
|
||||
" condition evaluated true or false, respectively.",
|
||||
" * A k indicates a constant decision or condition.",
|
||||
" * The slash / means this probe is excluded from summary results. ",
|
||||
CM_NULLPTR
|
||||
nullptr
|
||||
};
|
||||
}
|
||||
|
||||
@ -1787,7 +1787,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"run covbr: " << std::endl, this->Quiet);
|
||||
|
||||
if (!this->RunBullseyeCommand(cont, "covbr", CM_NULLPTR, outputFile)) {
|
||||
if (!this->RunBullseyeCommand(cont, "covbr", nullptr, outputFile)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for."
|
||||
<< "\n");
|
||||
return -1;
|
||||
@ -1860,7 +1860,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
||||
covLogXML.StartElement("Report");
|
||||
// write the bullseye header
|
||||
line = 0;
|
||||
for (int k = 0; bullseyeHelp[k] != CM_NULLPTR; ++k) {
|
||||
for (int k = 0; bullseyeHelp[k] != nullptr; ++k) {
|
||||
covLogXML.StartElement("Line");
|
||||
covLogXML.Attribute("Number", line);
|
||||
covLogXML.Attribute("Count", -1);
|
||||
|
@ -145,7 +145,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
|
||||
::curl_easy_setopt(this->Curl, CURLOPT_DEBUGFUNCTION, curlDebugCallback);
|
||||
// Set Content-Type to satisfy fussy modsecurity rules.
|
||||
struct curl_slist* headers =
|
||||
::curl_slist_append(CM_NULLPTR, "Content-Type: text/xml");
|
||||
::curl_slist_append(nullptr, "Content-Type: text/xml");
|
||||
// Add any additional headers that the user specified.
|
||||
for (std::vector<std::string>::const_iterator h = this->HttpHeaders.begin();
|
||||
h != this->HttpHeaders.end(); ++h) {
|
||||
@ -212,7 +212,7 @@ bool cmCTestCurl::HttpRequest(std::string const& url,
|
||||
::curl_easy_setopt(this->Curl, CURLOPT_FAILONERROR, 1);
|
||||
|
||||
// Add headers if any were specified.
|
||||
struct curl_slist* headers = CM_NULLPTR;
|
||||
struct curl_slist* headers = nullptr;
|
||||
if (!this->HttpHeaders.empty()) {
|
||||
for (std::vector<std::string>::const_iterator h =
|
||||
this->HttpHeaders.begin();
|
||||
|
@ -58,8 +58,8 @@ std::string cmCTestGIT::GetWorkingRevision()
|
||||
{
|
||||
// Run plumbing "git rev-list" to get work tree revision.
|
||||
const char* git = this->CommandLineTool.c_str();
|
||||
const char* git_rev_list[] = { git, "rev-list", "-n", "1",
|
||||
"HEAD", "--", CM_NULLPTR };
|
||||
const char* git_rev_list[] = { git, "rev-list", "-n", "1",
|
||||
"HEAD", "--", nullptr };
|
||||
std::string rev;
|
||||
OneLineParser out(this, "rl-out> ", rev);
|
||||
OutputLogger err(this->Log, "rl-err> ");
|
||||
@ -90,11 +90,11 @@ std::string cmCTestGIT::FindGitDir()
|
||||
|
||||
// Run "git rev-parse --git-dir" to locate the real .git directory.
|
||||
const char* git = this->CommandLineTool.c_str();
|
||||
char const* git_rev_parse[] = { git, "rev-parse", "--git-dir", CM_NULLPTR };
|
||||
char const* git_rev_parse[] = { git, "rev-parse", "--git-dir", nullptr };
|
||||
std::string git_dir_line;
|
||||
OneLineParser rev_parse_out(this, "rev-parse-out> ", git_dir_line);
|
||||
OutputLogger rev_parse_err(this->Log, "rev-parse-err> ");
|
||||
if (this->RunChild(git_rev_parse, &rev_parse_out, &rev_parse_err, CM_NULLPTR,
|
||||
if (this->RunChild(git_rev_parse, &rev_parse_out, &rev_parse_err, nullptr,
|
||||
cmProcessOutput::UTF8)) {
|
||||
git_dir = git_dir_line;
|
||||
}
|
||||
@ -118,7 +118,7 @@ std::string cmCTestGIT::FindGitDir()
|
||||
0 };
|
||||
OneLineParser cygpath_out(this, "cygpath-out> ", git_dir_line);
|
||||
OutputLogger cygpath_err(this->Log, "cygpath-err> ");
|
||||
if (this->RunChild(cygpath, &cygpath_out, &cygpath_err, CM_NULLPTR,
|
||||
if (this->RunChild(cygpath, &cygpath_out, &cygpath_err, nullptr,
|
||||
cmProcessOutput::UTF8)) {
|
||||
git_dir = git_dir_line;
|
||||
}
|
||||
@ -134,12 +134,11 @@ std::string cmCTestGIT::FindTopDir()
|
||||
|
||||
// Run "git rev-parse --show-cdup" to locate the top of the tree.
|
||||
const char* git = this->CommandLineTool.c_str();
|
||||
char const* git_rev_parse[] = { git, "rev-parse", "--show-cdup",
|
||||
CM_NULLPTR };
|
||||
char const* git_rev_parse[] = { git, "rev-parse", "--show-cdup", nullptr };
|
||||
std::string cdup;
|
||||
OneLineParser rev_parse_out(this, "rev-parse-out> ", cdup);
|
||||
OutputLogger rev_parse_err(this->Log, "rev-parse-err> ");
|
||||
if (this->RunChild(git_rev_parse, &rev_parse_out, &rev_parse_err, CM_NULLPTR,
|
||||
if (this->RunChild(git_rev_parse, &rev_parse_out, &rev_parse_err, nullptr,
|
||||
cmProcessOutput::UTF8) &&
|
||||
!cdup.empty()) {
|
||||
top_dir += "/";
|
||||
@ -170,7 +169,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
|
||||
}
|
||||
|
||||
// Sentinel argument.
|
||||
git_fetch.push_back(CM_NULLPTR);
|
||||
git_fetch.push_back(nullptr);
|
||||
|
||||
// Fetch upstream refs.
|
||||
OutputLogger fetch_out(this->Log, "fetch-out> ");
|
||||
@ -205,8 +204,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
|
||||
}
|
||||
|
||||
// Reset the local branch to point at that tracked from upstream.
|
||||
char const* git_reset[] = { git, "reset", "--hard", sha1.c_str(),
|
||||
CM_NULLPTR };
|
||||
char const* git_reset[] = { git, "reset", "--hard", sha1.c_str(), nullptr };
|
||||
OutputLogger reset_out(this->Log, "reset-out> ");
|
||||
OutputLogger reset_err(this->Log, "reset-err> ");
|
||||
return this->RunChild(&git_reset[0], &reset_out, &reset_err);
|
||||
@ -221,7 +219,7 @@ bool cmCTestGIT::UpdateByCustom(std::string const& custom)
|
||||
i != git_custom_command.end(); ++i) {
|
||||
git_custom.push_back(i->c_str());
|
||||
}
|
||||
git_custom.push_back(CM_NULLPTR);
|
||||
git_custom.push_back(nullptr);
|
||||
|
||||
OutputLogger custom_out(this->Log, "custom-out> ");
|
||||
OutputLogger custom_err(this->Log, "custom-err> ");
|
||||
@ -250,7 +248,7 @@ bool cmCTestGIT::UpdateImpl()
|
||||
|
||||
// Git < 1.6.5 did not support submodule --recursive
|
||||
if (this->GetGitVersion() < cmCTestGITVersion(1, 6, 5, 0)) {
|
||||
recursive = CM_NULLPTR;
|
||||
recursive = nullptr;
|
||||
// No need to require >= 1.6.5 if there are no submodules.
|
||||
if (cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str())) {
|
||||
this->Log << "Git < 1.6.5 cannot update submodules recursively\n";
|
||||
@ -259,7 +257,7 @@ bool cmCTestGIT::UpdateImpl()
|
||||
|
||||
// Git < 1.8.1 did not support sync --recursive
|
||||
if (this->GetGitVersion() < cmCTestGITVersion(1, 8, 1, 0)) {
|
||||
sync_recursive = CM_NULLPTR;
|
||||
sync_recursive = nullptr;
|
||||
// No need to require >= 1.8.1 if there are no submodules.
|
||||
if (cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str())) {
|
||||
this->Log << "Git < 1.8.1 cannot synchronize submodules recursively\n";
|
||||
@ -274,8 +272,7 @@ bool cmCTestGIT::UpdateImpl()
|
||||
std::string init_submodules =
|
||||
this->CTest->GetCTestConfiguration("GITInitSubmodules");
|
||||
if (cmSystemTools::IsOn(init_submodules.c_str())) {
|
||||
char const* git_submodule_init[] = { git, "submodule", "init",
|
||||
CM_NULLPTR };
|
||||
char const* git_submodule_init[] = { git, "submodule", "init", nullptr };
|
||||
ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
|
||||
top_dir.c_str());
|
||||
|
||||
@ -285,7 +282,7 @@ bool cmCTestGIT::UpdateImpl()
|
||||
}
|
||||
|
||||
char const* git_submodule_sync[] = { git, "submodule", "sync",
|
||||
sync_recursive, CM_NULLPTR };
|
||||
sync_recursive, nullptr };
|
||||
ret = this->RunChild(git_submodule_sync, &submodule_out, &submodule_err,
|
||||
top_dir.c_str());
|
||||
|
||||
@ -294,7 +291,7 @@ bool cmCTestGIT::UpdateImpl()
|
||||
}
|
||||
|
||||
char const* git_submodule[] = { git, "submodule", "update", recursive,
|
||||
CM_NULLPTR };
|
||||
nullptr };
|
||||
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
|
||||
top_dir.c_str());
|
||||
}
|
||||
@ -303,7 +300,7 @@ unsigned int cmCTestGIT::GetGitVersion()
|
||||
{
|
||||
if (!this->CurrentGitVersion) {
|
||||
const char* git = this->CommandLineTool.c_str();
|
||||
char const* git_version[] = { git, "--version", CM_NULLPTR };
|
||||
char const* git_version[] = { git, "--version", nullptr };
|
||||
std::string version;
|
||||
OneLineParser version_out(this, "version-out> ", version);
|
||||
OutputLogger version_err(this->Log, "version-err> ");
|
||||
@ -615,10 +612,10 @@ bool cmCTestGIT::LoadRevisions()
|
||||
std::string range = this->OldRevision + ".." + this->NewRevision;
|
||||
const char* git = this->CommandLineTool.c_str();
|
||||
const char* git_rev_list[] = { git, "rev-list", "--reverse",
|
||||
range.c_str(), "--", CM_NULLPTR };
|
||||
range.c_str(), "--", nullptr };
|
||||
const char* git_diff_tree[] = {
|
||||
git, "diff-tree", "--stdin", "--always", "-z",
|
||||
"-r", "--pretty=raw", "--encoding=utf-8", CM_NULLPTR
|
||||
"-r", "--pretty=raw", "--encoding=utf-8", nullptr
|
||||
};
|
||||
this->Log << this->ComputeCommandLine(git_rev_list) << " | "
|
||||
<< this->ComputeCommandLine(git_diff_tree) << "\n";
|
||||
@ -645,19 +642,18 @@ bool cmCTestGIT::LoadModifications()
|
||||
|
||||
// Use 'git update-index' to refresh the index w.r.t. the work tree.
|
||||
const char* git_update_index[] = { git, "update-index", "--refresh",
|
||||
CM_NULLPTR };
|
||||
nullptr };
|
||||
OutputLogger ui_out(this->Log, "ui-out> ");
|
||||
OutputLogger ui_err(this->Log, "ui-err> ");
|
||||
this->RunChild(git_update_index, &ui_out, &ui_err, CM_NULLPTR,
|
||||
this->RunChild(git_update_index, &ui_out, &ui_err, nullptr,
|
||||
cmProcessOutput::UTF8);
|
||||
|
||||
// Use 'git diff-index' to get modified files.
|
||||
const char* git_diff_index[] = { git, "diff-index", "-z",
|
||||
"HEAD", "--", CM_NULLPTR };
|
||||
"HEAD", "--", nullptr };
|
||||
DiffParser out(this, "di-out> ");
|
||||
OutputLogger err(this->Log, "di-err> ");
|
||||
this->RunChild(git_diff_index, &out, &err, CM_NULLPTR,
|
||||
cmProcessOutput::UTF8);
|
||||
this->RunChild(git_diff_index, &out, &err, nullptr, cmProcessOutput::UTF8);
|
||||
|
||||
for (std::vector<Change>::const_iterator ci = out.Changes.begin();
|
||||
ci != out.Changes.end(); ++ci) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
cmCTestGenericHandler::cmCTestGenericHandler()
|
||||
{
|
||||
this->HandlerVerbose = cmSystemTools::OUTPUT_NONE;
|
||||
this->CTest = CM_NULLPTR;
|
||||
this->CTest = nullptr;
|
||||
this->SubmitIndex = 0;
|
||||
this->AppendXML = false;
|
||||
this->Quiet = false;
|
||||
@ -70,7 +70,7 @@ const char* cmCTestGenericHandler::GetOption(const std::string& op)
|
||||
cmCTestGenericHandler::t_StringToString::iterator remit =
|
||||
this->Options.find(op);
|
||||
if (remit == this->Options.end()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
return remit->second.c_str();
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ std::string cmCTestHG::GetWorkingRevision()
|
||||
{
|
||||
// Run plumbing "hg identify" to get work tree revision.
|
||||
const char* hg = this->CommandLineTool.c_str();
|
||||
const char* hg_identify[] = { hg, "identify", "-i", CM_NULLPTR };
|
||||
const char* hg_identify[] = { hg, "identify", "-i", nullptr };
|
||||
std::string rev;
|
||||
IdentifyParser out(this, "rev-out> ", rev);
|
||||
OutputLogger err(this->Log, "rev-err> ");
|
||||
@ -126,7 +126,7 @@ bool cmCTestHG::UpdateImpl()
|
||||
// Use "hg pull" followed by "hg update" to update the working tree.
|
||||
{
|
||||
const char* hg = this->CommandLineTool.c_str();
|
||||
const char* hg_pull[] = { hg, "pull", "-v", CM_NULLPTR };
|
||||
const char* hg_pull[] = { hg, "pull", "-v", nullptr };
|
||||
OutputLogger out(this->Log, "pull-out> ");
|
||||
OutputLogger err(this->Log, "pull-err> ");
|
||||
this->RunChild(&hg_pull[0], &out, &err);
|
||||
@ -151,7 +151,7 @@ bool cmCTestHG::UpdateImpl()
|
||||
}
|
||||
|
||||
// Sentinel argument.
|
||||
hg_update.push_back(CM_NULLPTR);
|
||||
hg_update.push_back(nullptr);
|
||||
|
||||
OutputLogger out(this->Log, "update-out> ");
|
||||
OutputLogger err(this->Log, "update-err> ");
|
||||
@ -286,7 +286,7 @@ bool cmCTestHG::LoadRevisions()
|
||||
"</logentry>\n";
|
||||
const char* hg_log[] = {
|
||||
hg, "log", "--removed", "-r", range.c_str(),
|
||||
"--template", hgXMLTemplate, CM_NULLPTR
|
||||
"--template", hgXMLTemplate, nullptr
|
||||
};
|
||||
|
||||
LogParser out(this, "log-out> ");
|
||||
@ -302,7 +302,7 @@ bool cmCTestHG::LoadModifications()
|
||||
{
|
||||
// Use 'hg status' to get modified files.
|
||||
const char* hg = this->CommandLineTool.c_str();
|
||||
const char* hg_status[] = { hg, "status", CM_NULLPTR };
|
||||
const char* hg_status[] = { hg, "status", nullptr };
|
||||
StatusParser out(this, "status-out> ");
|
||||
OutputLogger err(this->Log, "status-err> ");
|
||||
this->RunChild(hg_status, &out, &err);
|
||||
|
@ -20,7 +20,7 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
|
||||
size_t cc;
|
||||
this->Arguments.reserve(INIT_SIZE);
|
||||
for (cc = 0; cc < INIT_SIZE; ++cc) {
|
||||
this->Arguments.push_back(CM_NULLPTR);
|
||||
this->Arguments.push_back(nullptr);
|
||||
}
|
||||
this->Arguments[ct_RETURN_VALUE] = "RETURN_VALUE";
|
||||
this->Arguments[ct_CAPTURE_CMAKE_ERROR] = "CAPTURE_CMAKE_ERROR";
|
||||
@ -89,7 +89,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
||||
SaveRestoreErrorState errorState;
|
||||
// Allocate space for argument values.
|
||||
this->Values.clear();
|
||||
this->Values.resize(this->Last, CM_NULLPTR);
|
||||
this->Values.resize(this->Last, nullptr);
|
||||
|
||||
// Process input arguments.
|
||||
this->ArgumentDoing = ArgumentDoingNone;
|
||||
|
@ -31,7 +31,7 @@
|
||||
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
|
||||
{
|
||||
this->Passthru = true;
|
||||
this->Process = CM_NULLPTR;
|
||||
this->Process = nullptr;
|
||||
this->ExitCode = 1;
|
||||
this->CWD = cmSystemTools::GetCurrentWorkingDirectory();
|
||||
|
||||
@ -129,7 +129,7 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
|
||||
return true;
|
||||
}
|
||||
this->RealArgC = 0;
|
||||
this->RealArgV = CM_NULLPTR;
|
||||
this->RealArgV = nullptr;
|
||||
std::cerr << "No launch/command separator ('--') found!\n";
|
||||
return false;
|
||||
}
|
||||
@ -224,11 +224,11 @@ void cmCTestLaunch::RunChild()
|
||||
|
||||
// Record child stdout and stderr if necessary.
|
||||
if (!this->Passthru) {
|
||||
char* data = CM_NULLPTR;
|
||||
char* data = nullptr;
|
||||
int length = 0;
|
||||
cmProcessOutput processOutput;
|
||||
std::string strdata;
|
||||
while (int p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
|
||||
while (int p = cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||
if (p == cmsysProcess_Pipe_STDOUT) {
|
||||
processOutput.DecodeText(data, length, strdata, 1);
|
||||
fout.write(strdata.c_str(), strdata.size());
|
||||
@ -254,7 +254,7 @@ void cmCTestLaunch::RunChild()
|
||||
}
|
||||
|
||||
// Wait for the real command to finish.
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
this->ExitCode = cmsysProcess_GetExitValue(cp);
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ void cmCTestLaunch::WriteXMLAction(cmXMLWriter& xml)
|
||||
}
|
||||
|
||||
// OutputType
|
||||
const char* outputType = CM_NULLPTR;
|
||||
const char* outputType = nullptr;
|
||||
if (!this->OptionTargetType.empty()) {
|
||||
if (this->OptionTargetType == "EXECUTABLE") {
|
||||
outputType = "executable";
|
||||
|
@ -14,7 +14,7 @@
|
||||
cmCTestMemCheckCommand::cmCTestMemCheckCommand()
|
||||
{
|
||||
this->Arguments[ctm_DEFECT_COUNT] = "DEFECT_COUNT";
|
||||
this->Arguments[ctm_LAST] = CM_NULLPTR;
|
||||
this->Arguments[ctm_LAST] = nullptr;
|
||||
this->Last = ctm_LAST;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = {
|
||||
{ "Allocation Conflict", cmCTestMemCheckHandler::FMM },
|
||||
{ "Bad Pointer Use", cmCTestMemCheckHandler::FMW },
|
||||
{ "Dangling Pointer", cmCTestMemCheckHandler::FMR },
|
||||
{ CM_NULLPTR, 0 }
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
static void xmlReportError(int line, const char* msg, void* data)
|
||||
@ -58,7 +58,7 @@ public:
|
||||
std::ostringstream ostr;
|
||||
ostr << name << ":\n";
|
||||
int i = 0;
|
||||
for (; atts[i] != CM_NULLPTR; i += 2) {
|
||||
for (; atts[i] != nullptr; i += 2) {
|
||||
ostr << " " << atts[i] << " - " << atts[i + 1] << "\n";
|
||||
}
|
||||
ostr << "\n";
|
||||
@ -69,12 +69,12 @@ public:
|
||||
const char* GetAttribute(const char* name, const char** atts)
|
||||
{
|
||||
int i = 0;
|
||||
for (; atts[i] != CM_NULLPTR; ++i) {
|
||||
for (; atts[i] != nullptr; ++i) {
|
||||
if (strcmp(name, atts[i]) == 0) {
|
||||
return atts[i + 1];
|
||||
}
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
void ParseError(const char** atts)
|
||||
{
|
||||
@ -228,9 +228,9 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
|
||||
// define the standard set of errors
|
||||
//----------------------------------------------------------------------
|
||||
static const char* cmCTestMemCheckResultStrings[] = {
|
||||
"ABR", "ABW", "ABWL", "COR", "EXU", "FFM", "FIM", "FMM",
|
||||
"FMR", "FMW", "FUM", "IPR", "IPW", "MAF", "MLK", "MPK",
|
||||
"NPR", "ODS", "PAR", "PLK", "UMC", "UMR", CM_NULLPTR
|
||||
"ABR", "ABW", "ABWL", "COR", "EXU", "FFM", "FIM", "FMM",
|
||||
"FMR", "FMW", "FUM", "IPR", "IPW", "MAF", "MLK", "MPK",
|
||||
"NPR", "ODS", "PAR", "PLK", "UMC", "UMR", nullptr
|
||||
};
|
||||
static const char* cmCTestMemCheckResultLongStrings[] = {
|
||||
"Threading Problem",
|
||||
@ -255,10 +255,10 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
|
||||
"PLK",
|
||||
"Uninitialized Memory Conditional",
|
||||
"Uninitialized Memory Read",
|
||||
CM_NULLPTR
|
||||
nullptr
|
||||
};
|
||||
this->GlobalResults.clear();
|
||||
for (int i = 0; cmCTestMemCheckResultStrings[i] != CM_NULLPTR; ++i) {
|
||||
for (int i = 0; cmCTestMemCheckResultStrings[i] != nullptr; ++i) {
|
||||
this->ResultStrings.push_back(cmCTestMemCheckResultStrings[i]);
|
||||
this->ResultStringsLong.push_back(cmCTestMemCheckResultLongStrings[i]);
|
||||
this->GlobalResults.push_back(0);
|
||||
|
@ -155,7 +155,7 @@ cmCTestP4::User cmCTestP4::GetUserData(const std::string& username)
|
||||
p4_users.push_back("-m");
|
||||
p4_users.push_back("1");
|
||||
p4_users.push_back(username.c_str());
|
||||
p4_users.push_back(CM_NULLPTR);
|
||||
p4_users.push_back(nullptr);
|
||||
|
||||
UserParser out(this, "users-out> ");
|
||||
OutputLogger err(this->Log, "users-err> ");
|
||||
@ -350,7 +350,7 @@ std::string cmCTestP4::GetWorkingRevision()
|
||||
|
||||
std::string source = this->SourceDirectory + "/...#have";
|
||||
p4_identify.push_back(source.c_str());
|
||||
p4_identify.push_back(CM_NULLPTR);
|
||||
p4_identify.push_back(nullptr);
|
||||
|
||||
std::string rev;
|
||||
IdentifyParser out(this, "p4_changes-out> ", rev);
|
||||
@ -411,7 +411,7 @@ bool cmCTestP4::LoadRevisions()
|
||||
|
||||
p4_changes.push_back("changes");
|
||||
p4_changes.push_back(range.c_str());
|
||||
p4_changes.push_back(CM_NULLPTR);
|
||||
p4_changes.push_back(nullptr);
|
||||
|
||||
ChangesParser out(this, "p4_changes-out> ");
|
||||
OutputLogger err(this->Log, "p4_changes-err> ");
|
||||
@ -431,7 +431,7 @@ bool cmCTestP4::LoadRevisions()
|
||||
p4_describe.push_back("describe");
|
||||
p4_describe.push_back("-s");
|
||||
p4_describe.push_back(i->c_str());
|
||||
p4_describe.push_back(CM_NULLPTR);
|
||||
p4_describe.push_back(nullptr);
|
||||
|
||||
DescribeParser outDescribe(this, "p4_describe-out> ");
|
||||
OutputLogger errDescribe(this->Log, "p4_describe-err> ");
|
||||
@ -451,7 +451,7 @@ bool cmCTestP4::LoadModifications()
|
||||
p4_diff.push_back("-dn");
|
||||
std::string source = this->SourceDirectory + "/...";
|
||||
p4_diff.push_back(source.c_str());
|
||||
p4_diff.push_back(CM_NULLPTR);
|
||||
p4_diff.push_back(nullptr);
|
||||
|
||||
DiffParser out(this, "p4_diff-out> ");
|
||||
OutputLogger err(this->Log, "p4_diff-err> ");
|
||||
@ -469,7 +469,7 @@ bool cmCTestP4::UpdateCustom(const std::string& custom)
|
||||
i != p4_custom_command.end(); ++i) {
|
||||
p4_custom.push_back(i->c_str());
|
||||
}
|
||||
p4_custom.push_back(CM_NULLPTR);
|
||||
p4_custom.push_back(nullptr);
|
||||
|
||||
OutputLogger custom_out(this->Log, "p4_customsync-out> ");
|
||||
OutputLogger custom_err(this->Log, "p4_customsync-err> ");
|
||||
@ -520,7 +520,7 @@ bool cmCTestP4::UpdateImpl()
|
||||
}
|
||||
|
||||
p4_sync.push_back(source.c_str());
|
||||
p4_sync.push_back(CM_NULLPTR);
|
||||
p4_sync.push_back(nullptr);
|
||||
|
||||
OutputLogger out(this->Log, "p4_sync-out> ");
|
||||
OutputLogger err(this->Log, "p4_sync-err> ");
|
||||
|
@ -25,12 +25,12 @@ cmCTestRunTest::cmCTestRunTest(cmCTestTestHandler* handler)
|
||||
{
|
||||
this->CTest = handler->CTest;
|
||||
this->TestHandler = handler;
|
||||
this->TestProcess = CM_NULLPTR;
|
||||
this->TestProcess = nullptr;
|
||||
this->TestResult.ExecutionTime = 0;
|
||||
this->TestResult.ReturnValue = 0;
|
||||
this->TestResult.Status = cmCTestTestHandler::NOT_RUN;
|
||||
this->TestResult.TestCount = 0;
|
||||
this->TestResult.Properties = CM_NULLPTR;
|
||||
this->TestResult.Properties = nullptr;
|
||||
this->ProcessOutput = "";
|
||||
this->CompressedOutput = "";
|
||||
this->CompressionRatio = 2;
|
||||
@ -621,7 +621,7 @@ double cmCTestRunTest::ResolveTimeout()
|
||||
return timeout;
|
||||
}
|
||||
struct tm* lctime;
|
||||
time_t current_time = time(CM_NULLPTR);
|
||||
time_t current_time = time(nullptr);
|
||||
lctime = gmtime(¤t_time);
|
||||
int gm_hour = lctime->tm_hour;
|
||||
time_t gm_time = mktime(lctime);
|
||||
|
@ -290,7 +290,7 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters,
|
||||
args.push_back(i->c_str());
|
||||
}
|
||||
|
||||
args.push_back(CM_NULLPTR);
|
||||
args.push_back(nullptr);
|
||||
|
||||
if (strcmp(parameters[0], "update") == 0) {
|
||||
return RunUpdateCommand(&args[0], out, err);
|
||||
|
@ -75,9 +75,9 @@ cmCTestScriptHandler::cmCTestScriptHandler()
|
||||
this->Backup = false;
|
||||
this->EmptyBinDir = false;
|
||||
this->EmptyBinDirOnce = false;
|
||||
this->Makefile = CM_NULLPTR;
|
||||
this->CMake = CM_NULLPTR;
|
||||
this->GlobalGenerator = CM_NULLPTR;
|
||||
this->Makefile = nullptr;
|
||||
this->CMake = nullptr;
|
||||
this->GlobalGenerator = nullptr;
|
||||
|
||||
this->ScriptStartTime = 0;
|
||||
|
||||
@ -114,10 +114,10 @@ void cmCTestScriptHandler::Initialize()
|
||||
this->ScriptStartTime = 0;
|
||||
|
||||
delete this->Makefile;
|
||||
this->Makefile = CM_NULLPTR;
|
||||
this->Makefile = nullptr;
|
||||
|
||||
delete this->GlobalGenerator;
|
||||
this->GlobalGenerator = CM_NULLPTR;
|
||||
this->GlobalGenerator = nullptr;
|
||||
|
||||
delete this->CMake;
|
||||
}
|
||||
@ -193,7 +193,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
||||
for (size_t i = 1; i < initArgs.size(); ++i) {
|
||||
argv.push_back(initArgs[i].c_str());
|
||||
}
|
||||
argv.push_back(CM_NULLPTR);
|
||||
argv.push_back(nullptr);
|
||||
|
||||
// Now create process object
|
||||
cmsysProcess* cp = cmsysProcess_New();
|
||||
@ -219,7 +219,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
||||
}
|
||||
|
||||
// Properly handle output of the build command
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
int result = cmsysProcess_GetState(cp);
|
||||
int retVal = 0;
|
||||
bool failed = false;
|
||||
@ -852,7 +852,7 @@ bool cmCTestScriptHandler::WriteInitialCache(const char* directory,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text != CM_NULLPTR) {
|
||||
if (text != nullptr) {
|
||||
fout.write(text, strlen(text));
|
||||
}
|
||||
|
||||
|
@ -29,12 +29,12 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
|
||||
|
||||
size_t cnt = 0;
|
||||
const char* smodel = args[cnt].c_str();
|
||||
const char* src_dir = CM_NULLPTR;
|
||||
const char* bld_dir = CM_NULLPTR;
|
||||
const char* src_dir = nullptr;
|
||||
const char* bld_dir = nullptr;
|
||||
|
||||
cnt++;
|
||||
|
||||
this->CTest->SetSpecificTrack(CM_NULLPTR);
|
||||
this->CTest->SetSpecificTrack(nullptr);
|
||||
if (cnt < args.size() - 1) {
|
||||
if (args[cnt] == "TRACK") {
|
||||
cnt++;
|
||||
|
@ -86,7 +86,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
|
||||
extraFiles.end());
|
||||
if (!this->CTest->SubmitExtraFiles(newExtraFiles)) {
|
||||
this->SetError("problem submitting extra files.");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
|
||||
this->CTest->GetInitializedHandler("submit");
|
||||
if (!handler) {
|
||||
this->SetError("internal CTest error. Cannot instantiate submit handler");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// If no FILES or PARTS given, *all* PARTS are submitted by default.
|
||||
|
@ -145,7 +145,7 @@ void cmCTestSubmitHandler::Initialize()
|
||||
this->HTTPProxyAuth = "";
|
||||
this->FTPProxy = "";
|
||||
this->FTPProxyType = 0;
|
||||
this->LogFile = CM_NULLPTR;
|
||||
this->LogFile = nullptr;
|
||||
this->Files.clear();
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
char error_buffer[1024];
|
||||
// Set Content-Type to satisfy fussy modsecurity rules.
|
||||
struct curl_slist* headers =
|
||||
::curl_slist_append(CM_NULLPTR, "Content-Type: text/xml");
|
||||
::curl_slist_append(nullptr, "Content-Type: text/xml");
|
||||
|
||||
// Add any additional headers that the user specified.
|
||||
for (std::vector<std::string>::const_iterator h = this->HttpHeaders.begin();
|
||||
@ -495,10 +495,10 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
// If curl failed for any reason, or checksum fails, wait and retry
|
||||
//
|
||||
if (res != CURLE_OK || this->HasErrors) {
|
||||
std::string retryDelay = this->GetOption("RetryDelay") == CM_NULLPTR
|
||||
std::string retryDelay = this->GetOption("RetryDelay") == nullptr
|
||||
? ""
|
||||
: this->GetOption("RetryDelay");
|
||||
std::string retryCount = this->GetOption("RetryCount") == CM_NULLPTR
|
||||
std::string retryCount = this->GetOption("RetryCount") == nullptr
|
||||
? ""
|
||||
: this->GetOption("RetryCount");
|
||||
|
||||
@ -764,7 +764,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
argv.push_back(scp_command.c_str()); // Scp command
|
||||
argv.push_back(scp_command.c_str()); // Dummy string for file
|
||||
argv.push_back(scp_command.c_str()); // Dummy string for remote url
|
||||
argv.push_back(CM_NULLPTR);
|
||||
argv.push_back(nullptr);
|
||||
|
||||
cmsysProcess* cp = cmsysProcess_New();
|
||||
cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1);
|
||||
@ -797,7 +797,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
cmProcessOutput processOutput;
|
||||
std::string strdata;
|
||||
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||
processOutput.DecodeText(data, length, strdata);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
cmCTestLogWrite(strdata.c_str(), strdata.size()),
|
||||
@ -810,7 +810,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
this->Quiet);
|
||||
}
|
||||
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
|
||||
int result = cmsysProcess_GetState(cp);
|
||||
|
||||
@ -1036,10 +1036,10 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
bool internalTest = cmSystemTools::IsOn(this->GetOption("InternalTest"));
|
||||
|
||||
// Get RETRY_COUNT and RETRY_DELAY values if they were set.
|
||||
std::string retryDelayString = this->GetOption("RetryDelay") == CM_NULLPTR
|
||||
std::string retryDelayString = this->GetOption("RetryDelay") == nullptr
|
||||
? ""
|
||||
: this->GetOption("RetryDelay");
|
||||
std::string retryCountString = this->GetOption("RetryCount") == CM_NULLPTR
|
||||
std::string retryCountString = this->GetOption("RetryCount") == nullptr
|
||||
? ""
|
||||
: this->GetOption("RetryCount");
|
||||
unsigned long retryDelay = 0;
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
typedef cmCTestGenericHandler Superclass;
|
||||
|
||||
cmCTestSubmitHandler();
|
||||
~cmCTestSubmitHandler() CM_OVERRIDE { this->LogFile = CM_NULLPTR; }
|
||||
~cmCTestSubmitHandler() CM_OVERRIDE { this->LogFile = nullptr; }
|
||||
|
||||
/*
|
||||
* The main entry point for this class
|
||||
|
@ -27,7 +27,7 @@ cmCTestTestCommand::cmCTestTestCommand()
|
||||
this->Arguments[ctt_SCHEDULE_RANDOM] = "SCHEDULE_RANDOM";
|
||||
this->Arguments[ctt_STOP_TIME] = "STOP_TIME";
|
||||
this->Arguments[ctt_TEST_LOAD] = "TEST_LOAD";
|
||||
this->Arguments[ctt_LAST] = CM_NULLPTR;
|
||||
this->Arguments[ctt_LAST] = nullptr;
|
||||
this->Last = ctt_LAST;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ cmCTestTestHandler::cmCTestTestHandler()
|
||||
|
||||
this->MemCheck = false;
|
||||
|
||||
this->LogFile = CM_NULLPTR;
|
||||
this->LogFile = nullptr;
|
||||
|
||||
// regex to detect <DartMeasurement>...</DartMeasurement>
|
||||
this->DartStuff.compile("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)");
|
||||
@ -600,7 +600,7 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create "
|
||||
<< (this->MemCheck ? "memory check" : "testing")
|
||||
<< " XML file" << std::endl);
|
||||
this->LogFile = CM_NULLPTR;
|
||||
this->LogFile = nullptr;
|
||||
return 1;
|
||||
}
|
||||
cmXMLWriter xml(xmlfile);
|
||||
@ -608,15 +608,15 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
}
|
||||
|
||||
if (!this->PostProcessHandler()) {
|
||||
this->LogFile = CM_NULLPTR;
|
||||
this->LogFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!failed.empty()) {
|
||||
this->LogFile = CM_NULLPTR;
|
||||
this->LogFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
this->LogFile = CM_NULLPTR;
|
||||
this->LogFile = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1327,7 +1327,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<std::string>& passed,
|
||||
|
||||
bool randomSchedule = this->CTest->GetScheduleType() == "Random";
|
||||
if (randomSchedule) {
|
||||
srand((unsigned)time(CM_NULLPTR));
|
||||
srand((unsigned)time(nullptr));
|
||||
}
|
||||
|
||||
for (ListOfTests::iterator it = this->TestList.begin();
|
||||
@ -1556,8 +1556,8 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<std::string>& vec)
|
||||
int retVal = 0;
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Run command: " << *it << std::endl, this->Quiet);
|
||||
if (!cmSystemTools::RunSingleCommand(it->c_str(), CM_NULLPTR, CM_NULLPTR,
|
||||
&retVal, CM_NULLPTR,
|
||||
if (!cmSystemTools::RunSingleCommand(it->c_str(), nullptr, nullptr,
|
||||
&retVal, nullptr,
|
||||
cmSystemTools::OUTPUT_MERGE
|
||||
/*this->Verbose*/) ||
|
||||
retVal != 0) {
|
||||
|
@ -78,12 +78,12 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
|
||||
this->CTest->GetInitializedHandler("update");
|
||||
if (!handler) {
|
||||
this->SetError("internal CTest error. Cannot instantiate update handler");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
handler->SetCommand(this);
|
||||
if (source_dir.empty()) {
|
||||
this->SetError("source directory not specified. Please use SOURCE tag");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
handler->SetOption("SourceDirectory", source_dir.c_str());
|
||||
handler->SetQuiet(this->Quiet);
|
||||
|
@ -309,7 +309,7 @@ bool cmCTestUpdateHandler::SelectVCS()
|
||||
|
||||
// If no update command was specified, lookup one for this VCS tool.
|
||||
if (this->UpdateCommand.empty()) {
|
||||
const char* key = CM_NULLPTR;
|
||||
const char* key = nullptr;
|
||||
switch (this->UpdateType) {
|
||||
case e_CVS:
|
||||
key = "CVSCommand";
|
||||
|
@ -18,7 +18,7 @@ cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler()
|
||||
this->CTest->GetInitializedHandler("upload");
|
||||
if (!handler) {
|
||||
this->SetError("internal CTest error. Cannot instantiate upload handler");
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
static_cast<cmCTestUploadHandler*>(handler)->SetFiles(this->Files);
|
||||
|
||||
|
@ -60,7 +60,7 @@ bool cmCTestVC::InitialCheckout(const char* command)
|
||||
ai != args.end(); ++ai) {
|
||||
vc_co.push_back(ai->c_str());
|
||||
}
|
||||
vc_co.push_back(CM_NULLPTR);
|
||||
vc_co.push_back(nullptr);
|
||||
|
||||
// Run the initial checkout command and log its output.
|
||||
this->Log << "--- Begin Initial Checkout ---\n";
|
||||
@ -113,7 +113,7 @@ bool cmCTestVC::RunUpdateCommand(char const* const* cmd, OutputParser* out,
|
||||
}
|
||||
|
||||
// Run the command.
|
||||
return this->RunChild(cmd, out, err, CM_NULLPTR, encoding);
|
||||
return this->RunChild(cmd, out, err, nullptr, encoding);
|
||||
}
|
||||
|
||||
std::string cmCTestVC::GetNightlyTime()
|
||||
|
@ -100,8 +100,8 @@ protected:
|
||||
Revision const* PriorRev;
|
||||
File()
|
||||
: Status(PathUpdated)
|
||||
, Rev(CM_NULLPTR)
|
||||
, PriorRev(CM_NULLPTR)
|
||||
, Rev(nullptr)
|
||||
, PriorRev(nullptr)
|
||||
{
|
||||
}
|
||||
File(PathStatus status, Revision const* rev, Revision const* priorRev)
|
||||
@ -117,12 +117,12 @@ protected:
|
||||
|
||||
/** Run a command line and send output to given parsers. */
|
||||
bool RunChild(char const* const* cmd, OutputParser* out, OutputParser* err,
|
||||
const char* workDir = CM_NULLPTR,
|
||||
const char* workDir = nullptr,
|
||||
Encoding encoding = cmProcessOutput::Auto);
|
||||
|
||||
/** Run VC update command line and send output to given parsers. */
|
||||
bool RunUpdateCommand(char const* const* cmd, OutputParser* out,
|
||||
OutputParser* err = CM_NULLPTR,
|
||||
OutputParser* err = nullptr,
|
||||
Encoding encoding = cmProcessOutput::Auto);
|
||||
|
||||
/** Write xml element for one file. */
|
||||
|
@ -135,8 +135,8 @@ bool cmParseMumpsCoverage::FindMumpsFile(std::string const& routine,
|
||||
return true;
|
||||
}
|
||||
// try some alternate names
|
||||
const char* tryname[] = { "GUX", "GTM", "ONT", CM_NULLPTR };
|
||||
for (int k = 0; tryname[k] != CM_NULLPTR; k++) {
|
||||
const char* tryname[] = { "GUX", "GTM", "ONT", nullptr };
|
||||
for (int k = 0; tryname[k] != nullptr; k++) {
|
||||
std::string routine2 = routine + tryname[k];
|
||||
i = this->RoutineToDirectory.find(routine2);
|
||||
if (i != this->RoutineToDirectory.end()) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
cmProcess::cmProcess()
|
||||
{
|
||||
this->Process = CM_NULLPTR;
|
||||
this->Process = nullptr;
|
||||
this->Timeout = 0;
|
||||
this->TotalTime = 0;
|
||||
this->ExitValue = 0;
|
||||
@ -45,7 +45,7 @@ bool cmProcess::StartProcess()
|
||||
i != this->Arguments.end(); ++i) {
|
||||
this->ProcessArgs.push_back(i->c_str());
|
||||
}
|
||||
this->ProcessArgs.push_back(CM_NULLPTR); // null terminate the list
|
||||
this->ProcessArgs.push_back(nullptr); // null terminate the list
|
||||
this->Process = cmsysProcess_New();
|
||||
cmsysProcess_SetCommand(this->Process, &*this->ProcessArgs.begin());
|
||||
if (!this->WorkingDirectory.empty()) {
|
||||
|
@ -51,6 +51,5 @@ cm_check_cxx_feature(make_unique)
|
||||
if(CMake_HAVE_CXX_MAKE_UNIQUE)
|
||||
set(CMake_HAVE_CXX_UNIQUE_PTR 1)
|
||||
endif()
|
||||
cm_check_cxx_feature(nullptr)
|
||||
cm_check_cxx_feature(override)
|
||||
cm_check_cxx_feature(unique_ptr)
|
||||
|
@ -1,14 +0,0 @@
|
||||
int test(int)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int test(int*)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
return test(nullptr);
|
||||
}
|
@ -18,30 +18,29 @@
|
||||
#include <vector>
|
||||
|
||||
static const char* cmDocumentationName[][2] = {
|
||||
{ CM_NULLPTR, " ccmake - Curses Interface for CMake." },
|
||||
{ CM_NULLPTR, CM_NULLPTR }
|
||||
{ nullptr, " ccmake - Curses Interface for CMake." },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
static const char* cmDocumentationUsage[][2] = {
|
||||
{ CM_NULLPTR, " ccmake <path-to-source>\n"
|
||||
" ccmake <path-to-existing-build>" },
|
||||
{ CM_NULLPTR,
|
||||
"Specify a source directory to (re-)generate a build system for "
|
||||
"it in the current working directory. Specify an existing build "
|
||||
"directory to re-generate its build system." },
|
||||
{ CM_NULLPTR, CM_NULLPTR }
|
||||
{ nullptr, " ccmake <path-to-source>\n"
|
||||
" ccmake <path-to-existing-build>" },
|
||||
{ nullptr, "Specify a source directory to (re-)generate a build system for "
|
||||
"it in the current working directory. Specify an existing build "
|
||||
"directory to re-generate its build system." },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
static const char* cmDocumentationUsageNote[][2] = {
|
||||
{ CM_NULLPTR, "Run 'ccmake --help' for more information." },
|
||||
{ CM_NULLPTR, CM_NULLPTR }
|
||||
{ nullptr, "Run 'ccmake --help' for more information." },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
static const char* cmDocumentationOptions[]
|
||||
[2] = { CMAKE_STANDARD_OPTIONS_TABLE,
|
||||
{ CM_NULLPTR, CM_NULLPTR } };
|
||||
{ nullptr, nullptr } };
|
||||
|
||||
cmCursesForm* cmCursesForm::CurrentForm = CM_NULLPTR;
|
||||
cmCursesForm* cmCursesForm::CurrentForm = nullptr;
|
||||
|
||||
extern "C" {
|
||||
|
||||
@ -169,7 +168,7 @@ int main(int argc, char const* const* argv)
|
||||
touchwin(stdscr);
|
||||
endwin();
|
||||
delete cmCursesForm::CurrentForm;
|
||||
cmCursesForm::CurrentForm = CM_NULLPTR;
|
||||
cmCursesForm::CurrentForm = nullptr;
|
||||
|
||||
std::cout << std::endl << std::endl;
|
||||
|
||||
|
@ -25,7 +25,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
|
||||
{
|
||||
this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key);
|
||||
this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " ");
|
||||
this->Entry = CM_NULLPTR;
|
||||
this->Entry = nullptr;
|
||||
this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1);
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
|
||||
this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " ");
|
||||
}
|
||||
|
||||
this->Entry = CM_NULLPTR;
|
||||
this->Entry = nullptr;
|
||||
const char* value = cm->GetState()->GetCacheEntryValue(key);
|
||||
assert(value);
|
||||
switch (cm->GetState()->GetCacheEntryType(key)) {
|
||||
@ -104,5 +104,5 @@ const char* cmCursesCacheEntryComposite::GetValue()
|
||||
if (this->Label) {
|
||||
return this->Label->GetValue();
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ bool cmCursesForm::Debug = false;
|
||||
|
||||
cmCursesForm::cmCursesForm()
|
||||
{
|
||||
this->Form = CM_NULLPTR;
|
||||
this->Form = nullptr;
|
||||
}
|
||||
|
||||
cmCursesForm::~cmCursesForm()
|
||||
@ -15,7 +15,7 @@ cmCursesForm::~cmCursesForm()
|
||||
if (this->Form) {
|
||||
unpost_form(this->Form);
|
||||
free_form(this->Form);
|
||||
this->Form = CM_NULLPTR;
|
||||
this->Form = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,8 @@ cmCursesLongMessageForm::cmCursesLongMessageForm(
|
||||
this->Messages += "\n\n";
|
||||
}
|
||||
this->Title = title;
|
||||
this->Fields[0] = CM_NULLPTR;
|
||||
this->Fields[1] = CM_NULLPTR;
|
||||
this->Fields[0] = nullptr;
|
||||
this->Fields[1] = nullptr;
|
||||
}
|
||||
|
||||
cmCursesLongMessageForm::~cmCursesLongMessageForm()
|
||||
@ -105,7 +105,7 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
|
||||
if (this->Form) {
|
||||
unpost_form(this->Form);
|
||||
free_form(this->Form);
|
||||
this->Form = CM_NULLPTR;
|
||||
this->Form = nullptr;
|
||||
}
|
||||
|
||||
const char* msg = this->Messages.c_str();
|
||||
@ -114,7 +114,7 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
|
||||
|
||||
if (this->Fields[0]) {
|
||||
free_field(this->Fields[0]);
|
||||
this->Fields[0] = CM_NULLPTR;
|
||||
this->Fields[0] = nullptr;
|
||||
}
|
||||
|
||||
this->Fields[0] = new_field(y - 6, x - 2, 1, 1, 0, 0);
|
||||
|
@ -31,8 +31,8 @@ cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args,
|
||||
, InitialWidth(initWidth)
|
||||
{
|
||||
this->NumberOfPages = 0;
|
||||
this->Fields = CM_NULLPTR;
|
||||
this->Entries = CM_NULLPTR;
|
||||
this->Fields = nullptr;
|
||||
this->Entries = nullptr;
|
||||
this->AdvancedMode = false;
|
||||
this->NumberOfVisibleEntries = 0;
|
||||
this->OkToGenerate = false;
|
||||
@ -59,7 +59,7 @@ cmCursesMainForm::~cmCursesMainForm()
|
||||
if (this->Form) {
|
||||
unpost_form(this->Form);
|
||||
free_form(this->Form);
|
||||
this->Form = CM_NULLPTR;
|
||||
this->Form = nullptr;
|
||||
}
|
||||
delete[] this->Fields;
|
||||
|
||||
@ -70,7 +70,7 @@ cmCursesMainForm::~cmCursesMainForm()
|
||||
delete this->Entries;
|
||||
if (this->CMakeInstance) {
|
||||
delete this->CMakeInstance;
|
||||
this->CMakeInstance = CM_NULLPTR;
|
||||
this->CMakeInstance = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ void cmCursesMainForm::RePost()
|
||||
if (this->Form) {
|
||||
unpost_form(this->Form);
|
||||
free_form(this->Form);
|
||||
this->Form = CM_NULLPTR;
|
||||
this->Form = nullptr;
|
||||
}
|
||||
delete[] this->Fields;
|
||||
if (this->AdvancedMode) {
|
||||
@ -210,7 +210,7 @@ void cmCursesMainForm::RePost()
|
||||
this->Fields = new FIELD*[3 * this->NumberOfVisibleEntries + 1];
|
||||
size_t cc;
|
||||
for (cc = 0; cc < 3 * this->NumberOfVisibleEntries + 1; cc++) {
|
||||
this->Fields[cc] = CM_NULLPTR;
|
||||
this->Fields[cc] = nullptr;
|
||||
}
|
||||
|
||||
// Assign fields
|
||||
@ -239,7 +239,7 @@ void cmCursesMainForm::RePost()
|
||||
this->NumberOfVisibleEntries = 1;
|
||||
}
|
||||
// Has to be null terminated.
|
||||
this->Fields[3 * this->NumberOfVisibleEntries] = CM_NULLPTR;
|
||||
this->Fields[3 * this->NumberOfVisibleEntries] = nullptr;
|
||||
}
|
||||
|
||||
void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||
@ -259,7 +259,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||
// Delete the previous form
|
||||
unpost_form(this->Form);
|
||||
free_form(this->Form);
|
||||
this->Form = CM_NULLPTR;
|
||||
this->Form = nullptr;
|
||||
}
|
||||
|
||||
// Wrong window size
|
||||
@ -341,14 +341,14 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||
}
|
||||
|
||||
// Give the current widget (if it exists), a chance to print keys
|
||||
cmCursesWidget* cw = CM_NULLPTR;
|
||||
cmCursesWidget* cw = nullptr;
|
||||
if (this->Form) {
|
||||
FIELD* currentField = current_field(this->Form);
|
||||
cw = reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
|
||||
}
|
||||
|
||||
char fmt_s[] = "%s";
|
||||
if (cw == CM_NULLPTR || !cw->PrintKeys()) {
|
||||
if (cw == nullptr || !cw->PrintKeys()) {
|
||||
char firstLine[512] = "";
|
||||
char secondLine[512] = "";
|
||||
char thirdLine[512] = "";
|
||||
@ -425,7 +425,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||
// Get the key of the current entry
|
||||
FIELD* cur = current_field(this->Form);
|
||||
int findex = field_index(cur);
|
||||
cmCursesWidget* lbl = CM_NULLPTR;
|
||||
cmCursesWidget* lbl = nullptr;
|
||||
if (findex >= 0) {
|
||||
lbl = reinterpret_cast<cmCursesWidget*>(
|
||||
field_userptr(this->Fields[findex - 2]));
|
||||
@ -557,7 +557,7 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||
this->FillCacheManagerFromUI();
|
||||
this->CMakeInstance->SaveCache(
|
||||
this->CMakeInstance->GetHomeOutputDirectory());
|
||||
this->LoadCache(CM_NULLPTR);
|
||||
this->LoadCache(nullptr);
|
||||
|
||||
// Get rid of previous errors
|
||||
this->Errors = std::vector<std::string>();
|
||||
@ -574,7 +574,7 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||
} else {
|
||||
retVal = this->CMakeInstance->Configure();
|
||||
}
|
||||
this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
|
||||
this->CMakeInstance->SetProgressCallback(nullptr, nullptr);
|
||||
|
||||
keypad(stdscr, true); /* Use key symbols as KEY_DOWN */
|
||||
|
||||
@ -628,7 +628,7 @@ int cmCursesMainForm::Generate()
|
||||
// run the generate process
|
||||
int retVal = this->CMakeInstance->Generate();
|
||||
|
||||
this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
|
||||
this->CMakeInstance->SetProgressCallback(nullptr, nullptr);
|
||||
keypad(stdscr, true); /* Use key symbols as KEY_DOWN */
|
||||
|
||||
if (retVal != 0 || !this->Errors.empty()) {
|
||||
@ -877,7 +877,7 @@ void cmCursesMainForm::HandleInput()
|
||||
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(
|
||||
field_userptr(this->Fields[findex - 2]));
|
||||
const char* curField = lbl->GetValue();
|
||||
const char* helpString = CM_NULLPTR;
|
||||
const char* helpString = nullptr;
|
||||
|
||||
const char* existingValue =
|
||||
this->CMakeInstance->GetState()->GetCacheEntryValue(curField);
|
||||
@ -962,7 +962,7 @@ void cmCursesMainForm::HandleInput()
|
||||
// (findex always corresponds to the value field)
|
||||
FIELD* nextCur;
|
||||
if (findex == 2) {
|
||||
nextCur = CM_NULLPTR;
|
||||
nextCur = nullptr;
|
||||
} else if (findex == 3 * this->NumberOfVisibleEntries - 1) {
|
||||
nextCur = this->Fields[findex - 5];
|
||||
} else {
|
||||
@ -992,7 +992,7 @@ void cmCursesMainForm::HandleInput()
|
||||
|
||||
if (nextCur) {
|
||||
// make the next or prev. current field after deletion
|
||||
nextCur = CM_NULLPTR;
|
||||
nextCur = nullptr;
|
||||
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
||||
for (it = this->Entries->begin(); it != this->Entries->end();
|
||||
++it) {
|
||||
@ -1041,7 +1041,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr)
|
||||
int findex = start_index;
|
||||
for (;;) {
|
||||
if (!str.empty()) {
|
||||
cmCursesWidget* lbl = CM_NULLPTR;
|
||||
cmCursesWidget* lbl = nullptr;
|
||||
if (findex >= 0) {
|
||||
lbl = reinterpret_cast<cmCursesWidget*>(
|
||||
field_userptr(this->Fields[findex - 2]));
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
* exception is during a resize. The optional argument specifies the
|
||||
* string to be displayed in the status bar.
|
||||
*/
|
||||
void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(CM_NULLPTR); }
|
||||
void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(nullptr); }
|
||||
virtual void UpdateStatusBar(const char* message);
|
||||
|
||||
/**
|
||||
|
@ -74,7 +74,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
|
||||
return false;
|
||||
}
|
||||
|
||||
this->OriginalString = CM_NULLPTR;
|
||||
this->OriginalString = nullptr;
|
||||
this->Done = false;
|
||||
|
||||
char debugMessage[128];
|
||||
|
@ -14,7 +14,7 @@ cmCursesWidget::~cmCursesWidget()
|
||||
{
|
||||
if (this->Field) {
|
||||
free_field(this->Field);
|
||||
this->Field = CM_NULLPTR;
|
||||
this->Field = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,19 +22,18 @@
|
||||
|
||||
#include "cmSystemTools.h" // IWYU pragma: keep
|
||||
|
||||
static const char* cmDocumentationName[][2] = { { CM_NULLPTR,
|
||||
static const char* cmDocumentationName[][2] = { { nullptr,
|
||||
" cmake-gui - CMake GUI." },
|
||||
{ CM_NULLPTR, CM_NULLPTR } };
|
||||
{ nullptr, nullptr } };
|
||||
|
||||
static const char* cmDocumentationUsage[][2] = {
|
||||
{ CM_NULLPTR, " cmake-gui [options]\n"
|
||||
" cmake-gui [options] <path-to-source>\n"
|
||||
" cmake-gui [options] <path-to-existing-build>" },
|
||||
{ CM_NULLPTR, CM_NULLPTR }
|
||||
{ nullptr, " cmake-gui [options]\n"
|
||||
" cmake-gui [options] <path-to-source>\n"
|
||||
" cmake-gui [options] <path-to-existing-build>" },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
static const char* cmDocumentationOptions[]
|
||||
[2] = { { CM_NULLPTR, CM_NULLPTR } };
|
||||
static const char* cmDocumentationOptions[][2] = { { nullptr, nullptr } };
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
static int cmOSXInstall(std::string dir);
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
QCMakeThread::QCMakeThread(QObject* p)
|
||||
: QThread(p)
|
||||
, CMakeInstance(CM_NULLPTR)
|
||||
, CMakeInstance(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ void QCMakeThread::run()
|
||||
emit this->cmakeInitialized();
|
||||
this->exec();
|
||||
delete this->CMakeInstance;
|
||||
this->CMakeInstance = CM_NULLPTR;
|
||||
this->CMakeInstance = nullptr;
|
||||
}
|
||||
|
||||
CMakeSetupDialog::CMakeSetupDialog()
|
||||
|
@ -13,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Compilers(QWidget* p = CM_NULLPTR)
|
||||
Compilers(QWidget* p = nullptr)
|
||||
: QWidget(p)
|
||||
{
|
||||
this->setupUi(this);
|
||||
|
@ -63,7 +63,7 @@ class QCMake : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QCMake(QObject* p = CM_NULLPTR);
|
||||
QCMake(QObject* p = nullptr);
|
||||
~QCMake();
|
||||
public slots:
|
||||
/// load the cache file in a directory
|
||||
|
@ -539,7 +539,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor(
|
||||
QModelIndex var = idx.sibling(idx.row(), 0);
|
||||
int type = var.data(QCMakeCacheModel::TypeRole).toInt();
|
||||
if (type == QCMakeProperty::BOOL) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
if (type == QCMakeProperty::PATH) {
|
||||
QCMakePathEditor* editor =
|
||||
@ -642,7 +642,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option,
|
||||
QStyleOptionButton opt;
|
||||
opt.QStyleOption::operator=(option);
|
||||
sz = sz.expandedTo(
|
||||
style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR)
|
||||
style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, nullptr)
|
||||
.size());
|
||||
|
||||
return sz;
|
||||
|
@ -57,7 +57,7 @@ void QCMakeFilePathEditor::chooseFile()
|
||||
emit this->fileDialogExists(true);
|
||||
path =
|
||||
QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(),
|
||||
CM_NULLPTR, QFileDialog::DontResolveSymlinks);
|
||||
nullptr, QFileDialog::DontResolveSymlinks);
|
||||
emit this->fileDialogExists(false);
|
||||
|
||||
if (!path.isEmpty()) {
|
||||
@ -89,7 +89,7 @@ void QCMakePathEditor::chooseFile()
|
||||
// use same QDirModel for all completers
|
||||
static QDirModel* fileDirModel()
|
||||
{
|
||||
static QDirModel* m = CM_NULLPTR;
|
||||
static QDirModel* m = nullptr;
|
||||
if (!m) {
|
||||
m = new QDirModel();
|
||||
}
|
||||
@ -97,7 +97,7 @@ static QDirModel* fileDirModel()
|
||||
}
|
||||
static QDirModel* pathDirModel()
|
||||
{
|
||||
static QDirModel* m = CM_NULLPTR;
|
||||
static QDirModel* m = nullptr;
|
||||
if (!m) {
|
||||
m = new QDirModel();
|
||||
m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot);
|
||||
|
@ -35,7 +35,7 @@ class QCMakePathEditor : public QCMakeFileEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString());
|
||||
QCMakePathEditor(QWidget* p = nullptr, const QString& var = QString());
|
||||
void chooseFile();
|
||||
};
|
||||
|
||||
@ -44,8 +44,7 @@ class QCMakeFilePathEditor : public QCMakeFileEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QCMakeFilePathEditor(QWidget* p = CM_NULLPTR,
|
||||
const QString& var = QString());
|
||||
QCMakeFilePathEditor(QWidget* p = nullptr, const QString& var = QString());
|
||||
void chooseFile();
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@ bool cmAddCustomCommandCommand::InitialPass(
|
||||
|
||||
std::string source, target, main_dependency, working, depfile;
|
||||
std::string comment_buffer;
|
||||
const char* comment = CM_NULLPTR;
|
||||
const char* comment = nullptr;
|
||||
std::vector<std::string> depends, outputs, output, byproducts;
|
||||
bool verbatim = false;
|
||||
bool append = false;
|
||||
|
@ -49,7 +49,7 @@ bool cmAddCustomTargetCommand::InitialPass(
|
||||
bool uses_terminal = false;
|
||||
bool command_expand_lists = false;
|
||||
std::string comment_buffer;
|
||||
const char* comment = CM_NULLPTR;
|
||||
const char* comment = nullptr;
|
||||
std::vector<std::string> sources;
|
||||
|
||||
// Keep track of parser state.
|
||||
|
@ -146,9 +146,9 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c,
|
||||
}
|
||||
|
||||
if (archive_write_open(
|
||||
this->Archive, this, CM_NULLPTR,
|
||||
this->Archive, this, nullptr,
|
||||
reinterpret_cast<archive_write_callback*>(&Callback::Write),
|
||||
CM_NULLPTR) != ARCHIVE_OK) {
|
||||
nullptr) != ARCHIVE_OK) {
|
||||
this->Error = "archive_write_open: ";
|
||||
this->Error += cm_archive_error_string(this->Archive);
|
||||
return;
|
||||
@ -224,7 +224,7 @@ bool cmArchiveWrite::AddFile(const char* file, size_t skip, const char* prefix)
|
||||
Entry e;
|
||||
cm_archive_entry_copy_sourcepath(e, file);
|
||||
cm_archive_entry_copy_pathname(e, dest);
|
||||
if (archive_read_disk_entry_from_file(this->Disk, e, -1, CM_NULLPTR) !=
|
||||
if (archive_read_disk_entry_from_file(this->Disk, e, -1, nullptr) !=
|
||||
ARCHIVE_OK) {
|
||||
this->Error = "archive_read_disk_entry_from_file '";
|
||||
this->Error += file;
|
||||
|
@ -67,13 +67,13 @@ public:
|
||||
* skip. The remaining part of the input path is appended to the
|
||||
* "prefix" value to construct the final name in the archive.
|
||||
*/
|
||||
bool Add(std::string path, size_t skip = 0, const char* prefix = CM_NULLPTR,
|
||||
bool Add(std::string path, size_t skip = 0, const char* prefix = nullptr,
|
||||
bool recursive = true);
|
||||
|
||||
/** Returns true if there has been no error. */
|
||||
operator safe_bool() const
|
||||
{
|
||||
return this->Okay() ? &cmArchiveWrite::safe_bool_true : CM_NULLPTR;
|
||||
return this->Okay() ? &cmArchiveWrite::safe_bool_true : nullptr;
|
||||
}
|
||||
|
||||
/** Returns true if there has been an error. */
|
||||
|
@ -218,8 +218,8 @@ void CCONV cmAddUtilityCommand(void* arg, const char* utilityName,
|
||||
}
|
||||
|
||||
// Pass the call to the makefile instance.
|
||||
mf->AddUtilityCommand(utilityName, (all ? false : true), CM_NULLPTR,
|
||||
depends2, commandLines);
|
||||
mf->AddUtilityCommand(utilityName, (all ? false : true), nullptr, depends2,
|
||||
commandLines);
|
||||
}
|
||||
void CCONV cmAddCustomCommand(void* arg, const char* source,
|
||||
const char* command, int numArgs,
|
||||
@ -257,7 +257,7 @@ void CCONV cmAddCustomCommand(void* arg, const char* source,
|
||||
}
|
||||
|
||||
// Pass the call to the makefile instance.
|
||||
const char* no_comment = CM_NULLPTR;
|
||||
const char* no_comment = nullptr;
|
||||
mf->AddCustomCommandOldStyle(target, outputs2, depends2, source,
|
||||
commandLines, no_comment);
|
||||
}
|
||||
@ -291,8 +291,8 @@ void CCONV cmAddCustomCommandToOutput(void* arg, const char* output,
|
||||
}
|
||||
|
||||
// Pass the call to the makefile instance.
|
||||
const char* no_comment = CM_NULLPTR;
|
||||
const char* no_working_dir = CM_NULLPTR;
|
||||
const char* no_comment = nullptr;
|
||||
const char* no_working_dir = nullptr;
|
||||
mf->AddCustomCommandToOutput(output, depends2, main_dependency, commandLines,
|
||||
no_comment, no_working_dir);
|
||||
}
|
||||
@ -333,8 +333,8 @@ void CCONV cmAddCustomCommandToTarget(void* arg, const char* target,
|
||||
// Pass the call to the makefile instance.
|
||||
std::vector<std::string> no_byproducts;
|
||||
std::vector<std::string> no_depends;
|
||||
const char* no_comment = CM_NULLPTR;
|
||||
const char* no_working_dir = CM_NULLPTR;
|
||||
const char* no_comment = nullptr;
|
||||
const char* no_working_dir = nullptr;
|
||||
mf->AddCustomCommandToTarget(target, no_byproducts, no_depends, commandLines,
|
||||
cctype, no_comment, no_working_dir);
|
||||
}
|
||||
@ -443,7 +443,7 @@ void CCONV cmExpandSourceListArguments(void* arg, int numArgs,
|
||||
result.push_back(args[i]);
|
||||
}
|
||||
int resargc = static_cast<int>(result.size());
|
||||
char** resargv = CM_NULLPTR;
|
||||
char** resargv = nullptr;
|
||||
if (resargc) {
|
||||
resargv = (char**)malloc(resargc * sizeof(char*));
|
||||
}
|
||||
@ -482,7 +482,7 @@ int CCONV cmGetTotalArgumentSize(int argc, char** argv)
|
||||
struct cmCPluginAPISourceFile
|
||||
{
|
||||
cmCPluginAPISourceFile()
|
||||
: RealSourceFile(CM_NULLPTR)
|
||||
: RealSourceFile(nullptr)
|
||||
{
|
||||
}
|
||||
cmSourceFile* RealSourceFile;
|
||||
@ -554,7 +554,7 @@ void CCONV* cmGetSource(void* arg, const char* name)
|
||||
}
|
||||
return (void*)i->second;
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* CCONV cmAddSource(void* arg, void* arg2)
|
||||
@ -562,7 +562,7 @@ void* CCONV cmAddSource(void* arg, void* arg2)
|
||||
cmMakefile* mf = static_cast<cmMakefile*>(arg);
|
||||
cmCPluginAPISourceFile* osf = static_cast<cmCPluginAPISourceFile*>(arg2);
|
||||
if (osf->FullPath.empty()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Create the real cmSourceFile instance and copy over saved information.
|
||||
|
@ -67,7 +67,7 @@
|
||||
struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
|
||||
{
|
||||
struct tm* lctime;
|
||||
time_t tctime = time(CM_NULLPTR);
|
||||
time_t tctime = time(nullptr);
|
||||
lctime = gmtime(&tctime);
|
||||
char buf[1024];
|
||||
// add todays year day and month to the time in str because
|
||||
@ -85,7 +85,7 @@ struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
|
||||
// As such, this time may be in the past or in the future.
|
||||
time_t ntime = curl_getdate(buf, &tctime);
|
||||
cmCTestLog(this, DEBUG, " Get curl time: " << ntime << std::endl);
|
||||
tctime = time(CM_NULLPTR);
|
||||
tctime = time(nullptr);
|
||||
cmCTestLog(this, DEBUG, " Get the current time: " << tctime << std::endl);
|
||||
|
||||
const int dayLength = 24 * 60 * 60;
|
||||
@ -131,7 +131,7 @@ std::string cmCTest::CleanString(const std::string& str)
|
||||
|
||||
std::string cmCTest::CurrentTime()
|
||||
{
|
||||
time_t currenttime = time(CM_NULLPTR);
|
||||
time_t currenttime = time(nullptr);
|
||||
struct tm* t = localtime(¤ttime);
|
||||
// return ::CleanString(ctime(¤ttime));
|
||||
char current_time[1024];
|
||||
@ -242,7 +242,7 @@ std::string cmCTest::DecodeURL(const std::string& in)
|
||||
for (const char* c = in.c_str(); *c; ++c) {
|
||||
if (*c == '%' && isxdigit(*(c + 1)) && isxdigit(*(c + 2))) {
|
||||
char buf[3] = { *(c + 1), *(c + 2), 0 };
|
||||
out.append(1, char(strtoul(buf, CM_NULLPTR, 16)));
|
||||
out.append(1, char(strtoul(buf, nullptr, 16)));
|
||||
c += 2;
|
||||
} else {
|
||||
out.append(1, *c);
|
||||
@ -286,7 +286,7 @@ cmCTest::cmCTest()
|
||||
this->ScheduleType = "";
|
||||
this->StopTime = "";
|
||||
this->NextDayStopTime = false;
|
||||
this->OutputLogFile = CM_NULLPTR;
|
||||
this->OutputLogFile = nullptr;
|
||||
this->OutputLogFileLastTag = -1;
|
||||
this->SuppressUpdatingCTestConfiguration = false;
|
||||
this->DartVersion = 1;
|
||||
@ -344,7 +344,7 @@ cmCTest::cmCTest()
|
||||
cmCTest::~cmCTest()
|
||||
{
|
||||
cmDeleteAll(this->TestingHandlers);
|
||||
this->SetOutputLogFileName(CM_NULLPTR);
|
||||
this->SetOutputLogFileName(nullptr);
|
||||
}
|
||||
|
||||
void cmCTest::SetParallelLevel(int level)
|
||||
@ -465,7 +465,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
std::string tag;
|
||||
|
||||
if (createNewTag) {
|
||||
time_t tctime = time(CM_NULLPTR);
|
||||
time_t tctime = time(nullptr);
|
||||
if (this->TomorrowTag) {
|
||||
tctime += (24 * 60 * 60);
|
||||
}
|
||||
@ -490,7 +490,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
}
|
||||
tfin.close();
|
||||
}
|
||||
if (tag.empty() || (CM_NULLPTR != command) || this->Parts[PartStart]) {
|
||||
if (tag.empty() || (nullptr != command) || this->Parts[PartStart]) {
|
||||
cmCTestOptionalLog(
|
||||
this, DEBUG,
|
||||
"TestModel: " << this->GetTestModelString() << std::endl, quiet);
|
||||
@ -512,7 +512,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
ofs << this->GetTestModelString() << std::endl;
|
||||
}
|
||||
ofs.close();
|
||||
if (CM_NULLPTR == command) {
|
||||
if (nullptr == command) {
|
||||
cmCTestOptionalLog(this, OUTPUT, "Create new tag: "
|
||||
<< tag << " - " << this->GetTestModelString()
|
||||
<< std::endl,
|
||||
@ -808,7 +808,7 @@ cmCTestGenericHandler* cmCTest::GetInitializedHandler(const char* handler)
|
||||
cmCTest::t_TestingHandlers::iterator it =
|
||||
this->TestingHandlers.find(handler);
|
||||
if (it == this->TestingHandlers.end()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
it->second->Initialize();
|
||||
return it->second;
|
||||
@ -819,7 +819,7 @@ cmCTestGenericHandler* cmCTest::GetHandler(const char* handler)
|
||||
cmCTest::t_TestingHandlers::iterator it =
|
||||
this->TestingHandlers.find(handler);
|
||||
if (it == this->TestingHandlers.end()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
return it->second;
|
||||
}
|
||||
@ -977,7 +977,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
||||
a != args.end(); ++a) {
|
||||
argv.push_back(a->c_str());
|
||||
}
|
||||
argv.push_back(CM_NULLPTR);
|
||||
argv.push_back(nullptr);
|
||||
|
||||
output = "";
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Run command:");
|
||||
@ -1007,7 +1007,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Each . represents "
|
||||
<< tick_len << " bytes of output" << std::endl
|
||||
<< " " << std::flush);
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||
processOutput.DecodeText(data, length, strdata);
|
||||
for (size_t cc = 0; cc < strdata.size(); ++cc) {
|
||||
if (strdata[cc] == 0) {
|
||||
@ -1043,7 +1043,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Size of output: "
|
||||
<< int(double(output.size()) / 1024.0) << "K" << std::endl);
|
||||
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
|
||||
int result = cmsysProcess_GetState(cp);
|
||||
|
||||
@ -1172,7 +1172,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
||||
int length;
|
||||
cmProcessOutput processOutput(encoding);
|
||||
std::string strdata;
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||
processOutput.DecodeText(data, length, strdata);
|
||||
if (output) {
|
||||
tempOutput.insert(tempOutput.end(), data, data + length);
|
||||
@ -1192,7 +1192,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
||||
}
|
||||
}
|
||||
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
processOutput.DecodeText(tempOutput, tempOutput);
|
||||
if (output && tempOutput.begin() != tempOutput.end()) {
|
||||
output->append(&*tempOutput.begin(), tempOutput.size());
|
||||
@ -2229,7 +2229,7 @@ int cmCTest::ExecuteTests()
|
||||
it->second->SetSubmitIndex(this->SubmitIndex);
|
||||
}
|
||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||
if (!this->Initialize(cwd.c_str(), CM_NULLPTR)) {
|
||||
if (!this->Initialize(cwd.c_str(), nullptr)) {
|
||||
res = 12;
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard."
|
||||
<< std::endl);
|
||||
@ -2387,7 +2387,7 @@ std::string cmCTest::GetShortPathToFile(const char* cfname)
|
||||
bool inBld = bldRelpath.find("..") == std::string::npos;
|
||||
// TODO: Handle files with .. in their name
|
||||
|
||||
std::string* res = CM_NULLPTR;
|
||||
std::string* res = nullptr;
|
||||
|
||||
if (inSrc && inBld) {
|
||||
// If both have relative path with no dots, pick the shorter one
|
||||
@ -2437,7 +2437,7 @@ void cmCTest::EmptyCTestConfiguration()
|
||||
void cmCTest::DetermineNextDayStop()
|
||||
{
|
||||
struct tm* lctime;
|
||||
time_t current_time = time(CM_NULLPTR);
|
||||
time_t current_time = time(nullptr);
|
||||
lctime = gmtime(¤t_time);
|
||||
int gm_hour = lctime->tm_hour;
|
||||
time_t gm_time = mktime(lctime);
|
||||
@ -2521,7 +2521,7 @@ bool cmCTest::GetProduceXML()
|
||||
const char* cmCTest::GetSpecificTrack()
|
||||
{
|
||||
if (this->SpecificTrack.empty()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
return this->SpecificTrack.c_str();
|
||||
}
|
||||
@ -2596,7 +2596,7 @@ bool cmCTest::RunCommand(const char* command, std::string* stdOut,
|
||||
a != args.end(); ++a) {
|
||||
argv.push_back(a->c_str());
|
||||
}
|
||||
argv.push_back(CM_NULLPTR);
|
||||
argv.push_back(nullptr);
|
||||
|
||||
*stdOut = "";
|
||||
*stdErr = "";
|
||||
@ -2619,7 +2619,7 @@ bool cmCTest::RunCommand(const char* command, std::string* stdOut,
|
||||
int res;
|
||||
bool done = false;
|
||||
while (!done) {
|
||||
res = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR);
|
||||
res = cmsysProcess_WaitForData(cp, &data, &length, nullptr);
|
||||
switch (res) {
|
||||
case cmsysProcess_Pipe_STDOUT:
|
||||
tempOutput.insert(tempOutput.end(), data, data + length);
|
||||
@ -2643,7 +2643,7 @@ bool cmCTest::RunCommand(const char* command, std::string* stdOut,
|
||||
}
|
||||
}
|
||||
|
||||
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
if (!tempOutput.empty()) {
|
||||
processOutput.DecodeText(tempOutput, tempOutput);
|
||||
stdOut->append(&*tempOutput.begin(), tempOutput.size());
|
||||
@ -2687,7 +2687,7 @@ void cmCTest::SetOutputLogFileName(const char* name)
|
||||
{
|
||||
if (this->OutputLogFile) {
|
||||
delete this->OutputLogFile;
|
||||
this->OutputLogFile = CM_NULLPTR;
|
||||
this->OutputLogFile = nullptr;
|
||||
}
|
||||
if (name) {
|
||||
this->OutputLogFile = new cmGeneratedFileStream(name);
|
||||
@ -2701,7 +2701,7 @@ static const char* cmCTestStringLogType[] = { "DEBUG",
|
||||
"HANDLER_VERBOSE_OUTPUT",
|
||||
"WARNING",
|
||||
"ERROR_MESSAGE",
|
||||
CM_NULLPTR };
|
||||
nullptr };
|
||||
|
||||
#define cmCTestLogOutputFileLine(stream) \
|
||||
if (this->ShowLineNumbers) { \
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
typedef std::set<std::string> SetOfStrings;
|
||||
|
||||
/** Process Command line arguments */
|
||||
int Run(std::vector<std::string>&, std::string* output = CM_NULLPTR);
|
||||
int Run(std::vector<std::string>&, std::string* output = nullptr);
|
||||
|
||||
/**
|
||||
* Initialize and finalize testing
|
||||
@ -252,8 +252,8 @@ public:
|
||||
* escaped for this to with spaces.
|
||||
*/
|
||||
bool RunCommand(const char* command, std::string* stdOut,
|
||||
std::string* stdErr, int* retVal = CM_NULLPTR,
|
||||
const char* dir = CM_NULLPTR, double timeout = 0.0,
|
||||
std::string* stdErr, int* retVal = nullptr,
|
||||
const char* dir = nullptr, double timeout = 0.0,
|
||||
Encoding encoding = cmProcessOutput::Auto);
|
||||
|
||||
/**
|
||||
@ -577,7 +577,7 @@ private:
|
||||
|
||||
/** Check if the argument is the one specified */
|
||||
bool CheckArgument(const std::string& arg, const char* varg1,
|
||||
const char* varg2 = CM_NULLPTR);
|
||||
const char* varg2 = nullptr);
|
||||
|
||||
/** Output errors from a test */
|
||||
void OutputTestErrors(std::vector<char> const& process_output);
|
||||
|
@ -173,7 +173,7 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
|
||||
}
|
||||
|
||||
const char* cmCacheManager::PersistentProperties[] = { "ADVANCED", "MODIFIED",
|
||||
"STRINGS", CM_NULLPTR };
|
||||
"STRINGS", nullptr };
|
||||
|
||||
bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
|
||||
CacheEntry& e)
|
||||
@ -440,7 +440,7 @@ cmCacheManager::CacheEntry* cmCacheManager::GetCacheEntry(
|
||||
if (i != this->Cache.end()) {
|
||||
return &i->second;
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(const char* key)
|
||||
@ -455,7 +455,7 @@ const char* cmCacheManager::GetInitializedCacheValue(
|
||||
if (i != this->Cache.end() && i->second.Initialized) {
|
||||
return i->second.Value.c_str();
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void cmCacheManager::PrintCache(std::ostream& out) const
|
||||
@ -610,7 +610,7 @@ const char* cmCacheManager::CacheIterator::GetProperty(
|
||||
if (!this->IsAtEnd()) {
|
||||
return this->GetEntry().GetProperty(prop);
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void cmCacheManager::CacheIterator::SetProperty(const std::string& p,
|
||||
@ -647,5 +647,5 @@ void cmCacheManager::CacheIterator::SetProperty(const std::string& p, bool v)
|
||||
bool cmCacheManager::CacheIterator::PropertyExists(
|
||||
const std::string& prop) const
|
||||
{
|
||||
return this->GetProperty(prop) != CM_NULLPTR;
|
||||
return this->GetProperty(prop) != nullptr;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
void PrintCache(std::ostream&) const;
|
||||
|
||||
///! Get the iterator for an entry with a given key.
|
||||
cmCacheManager::CacheIterator GetCacheIterator(const char* key = CM_NULLPTR);
|
||||
cmCacheManager::CacheIterator GetCacheIterator(const char* key = nullptr);
|
||||
|
||||
///! Remove an entry from the cache
|
||||
void RemoveCacheEntry(const std::string& key);
|
||||
@ -132,7 +132,7 @@ public:
|
||||
{
|
||||
cmCacheManager::CacheIterator it = this->GetCacheIterator(key.c_str());
|
||||
if (it.IsAtEnd()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
return it.GetValue();
|
||||
}
|
||||
@ -175,8 +175,7 @@ public:
|
||||
void RemoveCacheEntryProperty(std::string const& key,
|
||||
std::string const& propName)
|
||||
{
|
||||
this->GetCacheIterator(key.c_str())
|
||||
.SetProperty(propName, (void*)CM_NULLPTR);
|
||||
this->GetCacheIterator(key.c_str()).SetProperty(propName, (void*)nullptr);
|
||||
}
|
||||
|
||||
void AppendCacheEntryProperty(std::string const& key,
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
* Construct the command. By default it has no makefile.
|
||||
*/
|
||||
cmCommand()
|
||||
: Makefile(CM_NULLPTR)
|
||||
: Makefile(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ cmCommandArgumentParserHelper::cmCommandArgumentParserHelper()
|
||||
this->WarnUninitialized = false;
|
||||
this->CheckSystemVars = false;
|
||||
this->FileLine = -1;
|
||||
this->FileName = CM_NULLPTR;
|
||||
this->FileName = nullptr;
|
||||
this->RemoveEmpty = true;
|
||||
this->EmptyVariable[0] = 0;
|
||||
strcpy(this->DCURLYVariable, "${");
|
||||
@ -88,13 +88,13 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
||||
e << "Syntax $" << key << "{} is not supported. "
|
||||
<< "Only ${}, $ENV{}, and $CACHE{} are allowed.";
|
||||
this->SetError(e.str());
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
|
||||
{
|
||||
if (!var) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
if (this->FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0) {
|
||||
std::ostringstream ostr;
|
||||
@ -117,7 +117,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
|
||||
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
|
||||
}
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
if (this->EscapeQuotes && value) {
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(value));
|
||||
@ -169,7 +169,7 @@ char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
|
||||
void cmCommandArgumentParserHelper::AllocateParserType(
|
||||
cmCommandArgumentParserHelper::ParserType* pt, const char* str, int len)
|
||||
{
|
||||
pt->str = CM_NULLPTR;
|
||||
pt->str = nullptr;
|
||||
if (len == 0) {
|
||||
len = static_cast<int>(strlen(str));
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ cmCommandArgument::cmCommandArgument(cmCommandArgumentsHelper* args,
|
||||
, ArgumentsBeforeEmpty(true)
|
||||
, CurrentIndex(0)
|
||||
{
|
||||
if (args != CM_NULLPTR) {
|
||||
if (args != nullptr) {
|
||||
args->AddArgument(this);
|
||||
}
|
||||
|
||||
if (this->Group != CM_NULLPTR) {
|
||||
if (this->Group != nullptr) {
|
||||
this->Group->ContainedArguments.push_back(this);
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,7 @@ void cmCommandArgument::Follows(const cmCommandArgument* arg)
|
||||
|
||||
void cmCommandArgument::FollowsGroup(const cmCommandArgumentGroup* group)
|
||||
{
|
||||
if (group != CM_NULLPTR) {
|
||||
if (group != nullptr) {
|
||||
this->ArgumentsBeforeEmpty = false;
|
||||
this->ArgumentsBefore.insert(group->ContainedArguments.begin(),
|
||||
group->ContainedArguments.end());
|
||||
@ -52,7 +52,7 @@ bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const
|
||||
|
||||
bool cmCommandArgument::KeyMatches(const std::string& key) const
|
||||
{
|
||||
if ((this->Key == CM_NULLPTR) || (this->Key[0] == '\0')) {
|
||||
if ((this->Key == nullptr) || (this->Key[0] == '\0')) {
|
||||
return true;
|
||||
}
|
||||
return (key == this->Key);
|
||||
@ -60,7 +60,7 @@ bool cmCommandArgument::KeyMatches(const std::string& key) const
|
||||
|
||||
void cmCommandArgument::ApplyOwnGroup()
|
||||
{
|
||||
if (this->Group != CM_NULLPTR) {
|
||||
if (this->Group != nullptr) {
|
||||
for (std::vector<cmCommandArgument*>::const_iterator it =
|
||||
this->Group->ContainedArguments.begin();
|
||||
it != this->Group->ContainedArguments.end(); ++it) {
|
||||
@ -88,9 +88,9 @@ cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args,
|
||||
const char* key,
|
||||
cmCommandArgumentGroup* group)
|
||||
: cmCommandArgument(args, key, group)
|
||||
, Ignore(CM_NULLPTR)
|
||||
, Ignore(nullptr)
|
||||
{
|
||||
if ((key == CM_NULLPTR) || (*key == 0)) {
|
||||
if ((key == nullptr) || (*key == 0)) {
|
||||
this->DataStart = 0;
|
||||
} else {
|
||||
this->DataStart = 1;
|
||||
@ -100,7 +100,7 @@ cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args,
|
||||
bool cmCAStringVector::DoConsume(const std::string& arg, unsigned int index)
|
||||
{
|
||||
if (index >= this->DataStart) {
|
||||
if ((this->Ignore == CM_NULLPTR) || (arg != this->Ignore)) {
|
||||
if ((this->Ignore == nullptr) || (arg != this->Ignore)) {
|
||||
this->Vector.push_back(arg);
|
||||
}
|
||||
}
|
||||
@ -117,7 +117,7 @@ cmCAString::cmCAString(cmCommandArgumentsHelper* args, const char* key,
|
||||
cmCommandArgumentGroup* group)
|
||||
: cmCommandArgument(args, key, group)
|
||||
{
|
||||
if ((key == CM_NULLPTR) || (*key == 0)) {
|
||||
if ((key == nullptr) || (*key == 0)) {
|
||||
this->DataStart = 0;
|
||||
} else {
|
||||
this->DataStart = 1;
|
||||
@ -199,7 +199,7 @@ void cmCommandArgumentGroup::FollowsGroup(const cmCommandArgumentGroup* group)
|
||||
void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
|
||||
std::vector<std::string>* unconsumedArgs)
|
||||
{
|
||||
if (args == CM_NULLPTR) {
|
||||
if (args == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -210,8 +210,8 @@ void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
|
||||
(*argIt)->Reset();
|
||||
}
|
||||
|
||||
cmCommandArgument* activeArgument = CM_NULLPTR;
|
||||
const cmCommandArgument* previousArgument = CM_NULLPTR;
|
||||
cmCommandArgument* activeArgument = nullptr;
|
||||
const cmCommandArgument* previousArgument = nullptr;
|
||||
for (std::vector<std::string>::const_iterator it = args->begin();
|
||||
it != args->end(); ++it) {
|
||||
for (std::vector<cmCommandArgument*>::iterator argIt =
|
||||
@ -229,10 +229,10 @@ void cmCommandArgumentsHelper::Parse(const std::vector<std::string>* args,
|
||||
bool argDone = activeArgument->Consume(*it);
|
||||
previousArgument = activeArgument;
|
||||
if (argDone) {
|
||||
activeArgument = CM_NULLPTR;
|
||||
activeArgument = nullptr;
|
||||
}
|
||||
} else {
|
||||
if (unconsumedArgs != CM_NULLPTR) {
|
||||
if (unconsumedArgs != nullptr) {
|
||||
unconsumedArgs->push_back(*it);
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class cmCommandArgument
|
||||
{
|
||||
public:
|
||||
cmCommandArgument(cmCommandArgumentsHelper* args, const char* key,
|
||||
cmCommandArgumentGroup* group = CM_NULLPTR);
|
||||
cmCommandArgumentGroup* group = nullptr);
|
||||
virtual ~cmCommandArgument() {}
|
||||
|
||||
/// this argument may follow after arg. 0 means it comes first.
|
||||
@ -90,7 +90,7 @@ class cmCAStringVector : public cmCommandArgument
|
||||
{
|
||||
public:
|
||||
cmCAStringVector(cmCommandArgumentsHelper* args, const char* key,
|
||||
cmCommandArgumentGroup* group = CM_NULLPTR);
|
||||
cmCommandArgumentGroup* group = nullptr);
|
||||
|
||||
/// Return the vector of strings
|
||||
const std::vector<std::string>& GetVector() const { return this->Vector; }
|
||||
@ -113,7 +113,7 @@ class cmCAString : public cmCommandArgument
|
||||
{
|
||||
public:
|
||||
cmCAString(cmCommandArgumentsHelper* args, const char* key,
|
||||
cmCommandArgumentGroup* group = CM_NULLPTR);
|
||||
cmCommandArgumentGroup* group = nullptr);
|
||||
|
||||
/// Return the string
|
||||
const std::string& GetString() const { return this->String; }
|
||||
@ -132,7 +132,7 @@ class cmCAEnabler : public cmCommandArgument
|
||||
{
|
||||
public:
|
||||
cmCAEnabler(cmCommandArgumentsHelper* args, const char* key,
|
||||
cmCommandArgumentGroup* group = CM_NULLPTR);
|
||||
cmCommandArgumentGroup* group = nullptr);
|
||||
|
||||
/// Has it been enabled ?
|
||||
bool IsEnabled() const { return this->Enabled; }
|
||||
@ -149,7 +149,7 @@ class cmCADisabler : public cmCommandArgument
|
||||
{
|
||||
public:
|
||||
cmCADisabler(cmCommandArgumentsHelper* args, const char* key,
|
||||
cmCommandArgumentGroup* group = CM_NULLPTR);
|
||||
cmCommandArgumentGroup* group = nullptr);
|
||||
|
||||
/// Is it still enabled ?
|
||||
bool IsEnabled() const { return this->Enabled; }
|
||||
|
@ -79,7 +79,7 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
|
||||
const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
|
||||
format = cmOutputConverter::GetFortranFormat(tgtfmt);
|
||||
}
|
||||
const char* var = CM_NULLPTR;
|
||||
const char* var = nullptr;
|
||||
switch (format) {
|
||||
case cmOutputConverter::FortranFormatFixed:
|
||||
var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
|
||||
|
@ -194,7 +194,7 @@ cmComputeLinkDepends::cmComputeLinkDepends(const cmGeneratorTarget* target,
|
||||
this->OldLinkDirMode = false;
|
||||
|
||||
// No computation has been done.
|
||||
this->CCG = CM_NULLPTR;
|
||||
this->CCG = nullptr;
|
||||
}
|
||||
|
||||
cmComputeLinkDepends::~cmComputeLinkDepends()
|
||||
@ -286,7 +286,7 @@ std::map<std::string, int>::iterator cmComputeLinkDepends::AllocateLinkEntry(
|
||||
std::map<std::string, int>::iterator lei =
|
||||
this->LinkEntryIndex.insert(index_entry).first;
|
||||
this->EntryList.push_back(LinkEntry());
|
||||
this->InferredDependSets.push_back(CM_NULLPTR);
|
||||
this->InferredDependSets.push_back(nullptr);
|
||||
this->EntryConstraintGraph.push_back(EdgeList());
|
||||
return lei;
|
||||
}
|
||||
@ -314,7 +314,7 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item)
|
||||
// If the item has dependencies queue it to follow them.
|
||||
if (entry.Target) {
|
||||
// Target dependencies are always known. Follow them.
|
||||
BFSEntry qe = { index, CM_NULLPTR };
|
||||
BFSEntry qe = { index, nullptr };
|
||||
this->BFSQueue.push(qe);
|
||||
} else {
|
||||
// Look for an old-style <item>_LIB_DEPENDS variable.
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
bool IsFlag;
|
||||
LinkEntry()
|
||||
: Item()
|
||||
, Target(CM_NULLPTR)
|
||||
, Target(nullptr)
|
||||
, IsSharedDep(false)
|
||||
, IsFlag(false)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ cmComputeLinkInformation::cmComputeLinkInformation(
|
||||
this->GlobalGenerator, target, "linker search path");
|
||||
this->OrderRuntimeSearchPath = new cmOrderDirectories(
|
||||
this->GlobalGenerator, target, "runtime search path");
|
||||
this->OrderDependentRPath = CM_NULLPTR;
|
||||
this->OrderDependentRPath = nullptr;
|
||||
|
||||
// Get the language used for linking this target.
|
||||
this->LinkLanguage = this->Target->GetLinkerLanguage(config);
|
||||
@ -281,7 +281,7 @@ cmComputeLinkInformation::cmComputeLinkInformation(
|
||||
// On platforms without import libraries there may be a special flag
|
||||
// to use when creating a plugin (module) that obtains symbols from
|
||||
// the program that will load it.
|
||||
this->LoaderFlag = CM_NULLPTR;
|
||||
this->LoaderFlag = nullptr;
|
||||
if (!this->UseImportLibrary &&
|
||||
this->Target->GetType() == cmStateEnums::MODULE_LIBRARY) {
|
||||
std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
|
||||
@ -562,7 +562,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang)
|
||||
for (std::vector<std::string>::const_iterator i = libsVec.begin();
|
||||
i != libsVec.end(); ++i) {
|
||||
if (this->ImplicitLinkLibs.find(*i) == this->ImplicitLinkLibs.end()) {
|
||||
this->AddItem(*i, CM_NULLPTR);
|
||||
this->AddItem(*i, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -616,7 +616,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
|
||||
// Also add the item the interface specifies to be used in its place.
|
||||
std::string const& libName = tgt->GetImportedLibName(config);
|
||||
if (!libName.empty()) {
|
||||
this->AddItem(libName, CM_NULLPTR);
|
||||
this->AddItem(libName, nullptr);
|
||||
}
|
||||
} else {
|
||||
// Decide whether to use an import library.
|
||||
@ -710,7 +710,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
|
||||
|
||||
// Check if we need to include the dependent shared library in other
|
||||
// path ordering.
|
||||
cmOrderDirectories* order = CM_NULLPTR;
|
||||
cmOrderDirectories* order = nullptr;
|
||||
if (this->SharedDependencyMode == SharedDepModeLibDir &&
|
||||
!this->LinkWithRuntimePath /* AddLibraryRuntimeInfo adds it */) {
|
||||
// Add the item to the linker search path.
|
||||
@ -722,7 +722,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
|
||||
if (order) {
|
||||
if (tgt) {
|
||||
std::string soName = tgt->GetSOName(this->Config);
|
||||
const char* soname = soName.empty() ? CM_NULLPTR : soName.c_str();
|
||||
const char* soname = soName.empty() ? nullptr : soName.c_str();
|
||||
order->AddRuntimeLibrary(lib, soname);
|
||||
} else {
|
||||
order->AddRuntimeLibrary(lib);
|
||||
@ -741,9 +741,9 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
|
||||
this->LinkTypeEnabled = false;
|
||||
|
||||
// Lookup link type selection flags.
|
||||
const char* static_link_type_flag = CM_NULLPTR;
|
||||
const char* shared_link_type_flag = CM_NULLPTR;
|
||||
const char* target_type_str = CM_NULLPTR;
|
||||
const char* static_link_type_flag = nullptr;
|
||||
const char* shared_link_type_flag = nullptr;
|
||||
const char* target_type_str = nullptr;
|
||||
switch (this->Target->GetType()) {
|
||||
case cmStateEnums::EXECUTABLE:
|
||||
target_type_str = "EXE";
|
||||
@ -1623,7 +1623,7 @@ void cmComputeLinkInformation::AddLibraryRuntimeInfo(
|
||||
// Try to get the soname of the library. Only files with this name
|
||||
// could possibly conflict.
|
||||
std::string soName = target->GetSOName(this->Config);
|
||||
const char* soname = soName.empty() ? CM_NULLPTR : soName.c_str();
|
||||
const char* soname = soName.empty() ? nullptr : soName.c_str();
|
||||
|
||||
// Include this library in the runtime path ordering.
|
||||
this->OrderRuntimeSearchPath->AddRuntimeLibrary(fullPath, soname);
|
||||
|
@ -33,11 +33,11 @@ public:
|
||||
Item()
|
||||
: Value()
|
||||
, IsPath(true)
|
||||
, Target(CM_NULLPTR)
|
||||
, Target(nullptr)
|
||||
{
|
||||
}
|
||||
Item(std::string const& v, bool p,
|
||||
cmGeneratorTarget const* target = CM_NULLPTR)
|
||||
cmGeneratorTarget const* target = nullptr)
|
||||
: Value(v)
|
||||
, IsPath(p)
|
||||
, Target(target)
|
||||
|
@ -290,7 +290,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(
|
||||
// within the project.
|
||||
if (dependee && dependee->GetType() == cmStateEnums::EXECUTABLE &&
|
||||
!dependee->IsExecutableWithExports()) {
|
||||
dependee = CM_NULLPTR;
|
||||
dependee = nullptr;
|
||||
}
|
||||
|
||||
if (dependee) {
|
||||
@ -348,7 +348,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
|
||||
// within the project.
|
||||
if (linking && dependee && dependee->GetType() == cmStateEnums::EXECUTABLE &&
|
||||
!dependee->IsExecutableWithExports()) {
|
||||
dependee = CM_NULLPTR;
|
||||
dependee = nullptr;
|
||||
}
|
||||
|
||||
if (dependee) {
|
||||
|
@ -139,7 +139,7 @@ const char* cmConditionEvaluator::GetDefinitionIfUnquoted(
|
||||
if ((this->Policy54Status != cmPolicies::WARN &&
|
||||
this->Policy54Status != cmPolicies::OLD) &&
|
||||
argument.WasQuoted()) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char* def = this->Makefile.GetDefinition(argument.GetValue());
|
||||
@ -455,7 +455,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
||||
if (this->IsKeyword(keyCOMMAND, *arg) && argP1 != newArgs.end()) {
|
||||
cmCommand* command =
|
||||
this->Makefile.GetState()->GetCommand(argP1->c_str());
|
||||
this->HandlePredicate(command != CM_NULLPTR, reducible, arg, newArgs,
|
||||
this->HandlePredicate(command != nullptr, reducible, arg, newArgs,
|
||||
argP1, argP2);
|
||||
}
|
||||
// does a policy exist
|
||||
@ -467,7 +467,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
||||
// does a target exist
|
||||
if (this->IsKeyword(keyTARGET, *arg) && argP1 != newArgs.end()) {
|
||||
this->HandlePredicate(
|
||||
this->Makefile.FindTargetToUse(argP1->GetValue()) != CM_NULLPTR,
|
||||
this->Makefile.FindTargetToUse(argP1->GetValue()) != nullptr,
|
||||
reducible, arg, newArgs, argP1, argP2);
|
||||
}
|
||||
// does a test exist
|
||||
@ -475,8 +475,8 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
||||
this->Policy64Status != cmPolicies::WARN) {
|
||||
if (this->IsKeyword(keyTEST, *arg) && argP1 != newArgs.end()) {
|
||||
const cmTest* haveTest = this->Makefile.GetTest(argP1->c_str());
|
||||
this->HandlePredicate(haveTest != CM_NULLPTR, reducible, arg,
|
||||
newArgs, argP1, argP2);
|
||||
this->HandlePredicate(haveTest != nullptr, reducible, arg, newArgs,
|
||||
argP1, argP2);
|
||||
}
|
||||
} else if (this->Policy64Status == cmPolicies::WARN &&
|
||||
this->IsKeyword(keyTEST, *arg)) {
|
||||
|
@ -25,7 +25,6 @@
|
||||
#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH
|
||||
#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH
|
||||
#cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE
|
||||
#cmakedefine CMake_HAVE_CXX_NULLPTR
|
||||
#cmakedefine CMake_HAVE_CXX_OVERRIDE
|
||||
#cmakedefine CMake_HAVE_CXX_UNIQUE_PTR
|
||||
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
|
||||
@ -47,12 +46,6 @@ elif defined(CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH)
|
||||
#define CM_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#ifdef CMake_HAVE_CXX_NULLPTR
|
||||
#define CM_NULLPTR nullptr
|
||||
#else
|
||||
#define CM_NULLPTR 0
|
||||
#endif
|
||||
|
||||
#ifdef CMake_HAVE_CXX_OVERRIDE
|
||||
#define CM_OVERRIDE override
|
||||
#else
|
||||
|
@ -69,7 +69,7 @@ void cmEventBasedConnection::on_new_connection(uv_stream_t* stream, int status)
|
||||
|
||||
bool cmEventBasedConnection::IsOpen() const
|
||||
{
|
||||
return this->WriteStream != CM_NULLPTR;
|
||||
return this->WriteStream != nullptr;
|
||||
}
|
||||
|
||||
void cmEventBasedConnection::WriteData(const std::string& data)
|
||||
|
@ -102,7 +102,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
}
|
||||
|
||||
const char* sourceDirectory = argv[2].c_str();
|
||||
const char* projectName = CM_NULLPTR;
|
||||
const char* projectName = nullptr;
|
||||
std::string targetName;
|
||||
std::vector<std::string> cmakeFlags(1, "CMAKE_FLAGS"); // fake argv[0]
|
||||
std::vector<std::string> compileDefs;
|
||||
|
@ -75,7 +75,7 @@ CM_AUTO_PTR<cmCryptoHash> cmCryptoHash::New(const char* algo)
|
||||
if (strcmp(algo, "SHA3_512") == 0) {
|
||||
return CM_AUTO_PTR<cmCryptoHash>(new cmCryptoHash(AlgoSHA3_512));
|
||||
}
|
||||
return CM_AUTO_PTR<cmCryptoHash>(CM_NULLPTR);
|
||||
return CM_AUTO_PTR<cmCryptoHash>(nullptr);
|
||||
}
|
||||
|
||||
bool cmCryptoHash::IntFromHexDigit(char input, char& output)
|
||||
|
@ -8,6 +8,6 @@
|
||||
#include "cm_curl.h"
|
||||
#include <string>
|
||||
|
||||
std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = CM_NULLPTR);
|
||||
std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = nullptr);
|
||||
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
|
||||
, Backtrace()
|
||||
, Comment(comment ? comment : "")
|
||||
, WorkingDirectory(workingDirectory ? workingDirectory : "")
|
||||
, HaveComment(comment != CM_NULLPTR)
|
||||
, HaveComment(comment != nullptr)
|
||||
, EscapeAllowMakeVars(false)
|
||||
, EscapeOldStyle(true)
|
||||
, CommandExpandLists(false)
|
||||
@ -62,7 +62,7 @@ const cmCustomCommandLines& cmCustomCommand::GetCommandLines() const
|
||||
|
||||
const char* cmCustomCommand::GetComment() const
|
||||
{
|
||||
const char* no_comment = CM_NULLPTR;
|
||||
const char* no_comment = nullptr;
|
||||
return this->HaveComment ? this->Comment.c_str() : no_comment;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ const char* cmCustomCommandGenerator::GetCrossCompilingEmulator(
|
||||
unsigned int c) const
|
||||
{
|
||||
if (!this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")) {
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
std::string const& argv0 = this->CommandLines[c][0];
|
||||
cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0);
|
||||
@ -83,7 +83,7 @@ const char* cmCustomCommandGenerator::GetCrossCompilingEmulator(
|
||||
!target->IsImported()) {
|
||||
return target->GetProperty("CROSSCOMPILING_EMULATOR");
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const
|
||||
@ -96,7 +96,7 @@ const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const
|
||||
!this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING"))) {
|
||||
return target->GetLocation(this->Config);
|
||||
}
|
||||
return CM_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
|
||||
@ -140,14 +140,13 @@ void cmCustomCommandGenerator::AppendArguments(unsigned int c,
|
||||
std::string& cmd) const
|
||||
{
|
||||
unsigned int offset = 1;
|
||||
if (this->GetCrossCompilingEmulator(c) != CM_NULLPTR) {
|
||||
if (this->GetCrossCompilingEmulator(c) != nullptr) {
|
||||
offset = 0;
|
||||
}
|
||||
cmCustomCommandLine const& commandLine = this->CommandLines[c];
|
||||
for (unsigned int j = offset; j < commandLine.size(); ++j) {
|
||||
std::string arg;
|
||||
if (const char* location =
|
||||
j == 0 ? this->GetArgv0Location(c) : CM_NULLPTR) {
|
||||
if (const char* location = j == 0 ? this->GetArgv0Location(c) : nullptr) {
|
||||
// GetCommand returned the emulator instead of the argv0 location,
|
||||
// so transform the latter now.
|
||||
arg = location;
|
||||
|
@ -35,7 +35,7 @@ const char* cmDefinitions::Get(const std::string& key, StackIter begin,
|
||||
StackIter end)
|
||||
{
|
||||
Def const& def = cmDefinitions::GetInternal(key, begin, end, false);
|
||||
return def.Exists ? def.c_str() : CM_NULLPTR;
|
||||
return def.Exists ? def.c_str() : nullptr;
|
||||
}
|
||||
|
||||
void cmDefinitions::Raise(const std::string& key, StackIter begin,
|
||||
|
@ -18,7 +18,7 @@ cmDepends::cmDepends(cmLocalGenerator* lg, const char* targetDir)
|
||||
: CompileDirectory()
|
||||
, LocalGenerator(lg)
|
||||
, Verbose(false)
|
||||
, FileComparison(CM_NULLPTR)
|
||||
, FileComparison(nullptr)
|
||||
, TargetDirectory(targetDir)
|
||||
, MaxPath(16384)
|
||||
, Dependee(new char[MaxPath])
|
||||
@ -125,7 +125,7 @@ bool cmDepends::CheckDependencies(
|
||||
// regenerated.
|
||||
bool okay = true;
|
||||
bool dependerExists = false;
|
||||
DependencyVector* currentDependencies = CM_NULLPTR;
|
||||
DependencyVector* currentDependencies = nullptr;
|
||||
|
||||
while (internalDepends.getline(this->Dependee, this->MaxPath)) {
|
||||
if (this->Dependee[0] == 0 || this->Dependee[0] == '#' ||
|
||||
@ -167,7 +167,7 @@ bool cmDepends::CheckDependencies(
|
||||
bool regenerate = false;
|
||||
const char* dependee = this->Dependee + 1;
|
||||
const char* depender = this->Depender;
|
||||
if (currentDependencies != CM_NULLPTR) {
|
||||
if (currentDependencies != nullptr) {
|
||||
currentDependencies->push_back(dependee);
|
||||
}
|
||||
|
||||
@ -227,9 +227,9 @@ bool cmDepends::CheckDependencies(
|
||||
|
||||
// Remove the information of this depender from the map, it needs
|
||||
// to be rescanned
|
||||
if (currentDependencies != CM_NULLPTR) {
|
||||
if (currentDependencies != nullptr) {
|
||||
validDeps.erase(this->Depender);
|
||||
currentDependencies = CM_NULLPTR;
|
||||
currentDependencies = nullptr;
|
||||
}
|
||||
|
||||
// Remove the depender to be sure it is rebuilt.
|
||||
@ -246,7 +246,7 @@ bool cmDepends::CheckDependencies(
|
||||
void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
|
||||
{
|
||||
// Look for the new per "TARGET_" variant first:
|
||||
const char* includePath = CM_NULLPTR;
|
||||
const char* includePath = nullptr;
|
||||
std::string includePathVar = "CMAKE_";
|
||||
includePathVar += lang;
|
||||
includePathVar += "_TARGET_INCLUDE_PATH";
|
||||
|
@ -29,7 +29,7 @@ class cmDepends
|
||||
public:
|
||||
/** Instances need to know the build directory name and the relative
|
||||
path from the build directory to the target file. */
|
||||
cmDepends(cmLocalGenerator* lg = CM_NULLPTR, const char* targetDir = "");
|
||||
cmDepends(cmLocalGenerator* lg = nullptr, const char* targetDir = "");
|
||||
|
||||
/** at what level will the compile be done from */
|
||||
void SetCompileDirectory(const char* dir) { this->CompileDirectory = dir; }
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define INCLUDE_REGEX_TRANSFORM_MARKER "#IncludeRegexTransform: "
|
||||
|
||||
cmDependsC::cmDependsC()
|
||||
: ValidDeps(CM_NULLPTR)
|
||||
: ValidDeps(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
|
||||
std::set<std::string> dependencies;
|
||||
bool haveDeps = false;
|
||||
|
||||
if (this->ValidDeps != CM_NULLPTR) {
|
||||
if (this->ValidDeps != nullptr) {
|
||||
std::map<std::string, DependencyVector>::const_iterator tmpIt =
|
||||
this->ValidDeps->find(obj);
|
||||
if (tmpIt != this->ValidDeps->end()) {
|
||||
@ -259,12 +259,12 @@ void cmDependsC::ReadCacheFile()
|
||||
}
|
||||
|
||||
std::string line;
|
||||
cmIncludeLines* cacheEntry = CM_NULLPTR;
|
||||
cmIncludeLines* cacheEntry = nullptr;
|
||||
bool haveFileName = false;
|
||||
|
||||
while (cmSystemTools::GetLineFromStream(fin, line)) {
|
||||
if (line.empty()) {
|
||||
cacheEntry = CM_NULLPTR;
|
||||
cacheEntry = nullptr;
|
||||
haveFileName = false;
|
||||
continue;
|
||||
}
|
||||
@ -302,7 +302,7 @@ void cmDependsC::ReadCacheFile()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (cacheEntry != CM_NULLPTR) {
|
||||
} else if (cacheEntry != nullptr) {
|
||||
UnscannedEntry entry;
|
||||
entry.FileName = line;
|
||||
if (cmSystemTools::GetLineFromStream(fin, line)) {
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
};
|
||||
|
||||
cmDependsFortran::cmDependsFortran()
|
||||
: Internal(CM_NULLPTR)
|
||||
: Internal(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ void cmDependsJavaParserHelper::DeallocateParserType(char** pt)
|
||||
if (!*pt) {
|
||||
return;
|
||||
}
|
||||
*pt = CM_NULLPTR;
|
||||
*pt = nullptr;
|
||||
this->UnionsAvailable--;
|
||||
}
|
||||
|
||||
@ -158,13 +158,13 @@ void cmDependsJavaParserHelper::PrepareElement(
|
||||
cmDependsJavaParserHelper::ParserType* me)
|
||||
{
|
||||
// Inititalize self
|
||||
me->str = CM_NULLPTR;
|
||||
me->str = nullptr;
|
||||
}
|
||||
|
||||
void cmDependsJavaParserHelper::AllocateParserType(
|
||||
cmDependsJavaParserHelper::ParserType* pt, const char* str, int len)
|
||||
{
|
||||
pt->str = CM_NULLPTR;
|
||||
pt->str = nullptr;
|
||||
if (len == 0) {
|
||||
len = (int)strlen(str);
|
||||
}
|
||||
@ -224,7 +224,7 @@ std::vector<std::string> cmDependsJavaParserHelper::GetFilesProduced()
|
||||
std::vector<CurrentClass>::const_iterator it;
|
||||
for (it = toplevel.NestedClasses.begin(); it != toplevel.NestedClasses.end();
|
||||
++it) {
|
||||
it->AddFileNamesForPrinting(&files, CM_NULLPTR, "$");
|
||||
it->AddFileNamesForPrinting(&files, nullptr, "$");
|
||||
}
|
||||
return files;
|
||||
}
|
||||
@ -324,7 +324,7 @@ void cmDependsJavaParserHelper::Error(const char* str)
|
||||
void cmDependsJavaParserHelper::UpdateCombine(const char* str1,
|
||||
const char* str2)
|
||||
{
|
||||
if (this->CurrentCombine == "" && str1 != CM_NULLPTR) {
|
||||
if (this->CurrentCombine == "" && str1 != nullptr) {
|
||||
this->CurrentCombine = str1;
|
||||
}
|
||||
this->CurrentCombine += ".";
|
||||
|
@ -41,12 +41,12 @@ static const char* cmDocumentationStandardOptions[][2] = {
|
||||
{ "--help-variable-list [<f>]",
|
||||
"List variables with help available and exit." },
|
||||
{ "--help-variables [<f>]", "Print cmake-variables manual and exit." },
|
||||
{ CM_NULLPTR, CM_NULLPTR }
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
static const char* cmDocumentationGeneratorsHeader[][2] = {
|
||||
{ CM_NULLPTR, "The following generators are available on this platform:" },
|
||||
{ CM_NULLPTR, CM_NULLPTR }
|
||||
{ nullptr, "The following generators are available on this platform:" },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
cmDocumentation::cmDocumentation()
|
||||
@ -403,7 +403,7 @@ void cmDocumentation::SetSections(
|
||||
|
||||
void cmDocumentation::PrependSection(const char* name, const char* docs[][2])
|
||||
{
|
||||
cmDocumentationSection* sec = CM_NULLPTR;
|
||||
cmDocumentationSection* sec = nullptr;
|
||||
if (this->AllSections.find(name) == this->AllSections.end()) {
|
||||
sec =
|
||||
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
|
||||
@ -417,7 +417,7 @@ void cmDocumentation::PrependSection(const char* name, const char* docs[][2])
|
||||
void cmDocumentation::PrependSection(const char* name,
|
||||
std::vector<cmDocumentationEntry>& docs)
|
||||
{
|
||||
cmDocumentationSection* sec = CM_NULLPTR;
|
||||
cmDocumentationSection* sec = nullptr;
|
||||
if (this->AllSections.find(name) == this->AllSections.end()) {
|
||||
sec =
|
||||
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
|
||||
@ -430,7 +430,7 @@ void cmDocumentation::PrependSection(const char* name,
|
||||
|
||||
void cmDocumentation::AppendSection(const char* name, const char* docs[][2])
|
||||
{
|
||||
cmDocumentationSection* sec = CM_NULLPTR;
|
||||
cmDocumentationSection* sec = nullptr;
|
||||
if (this->AllSections.find(name) == this->AllSections.end()) {
|
||||
sec =
|
||||
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
|
||||
@ -444,7 +444,7 @@ void cmDocumentation::AppendSection(const char* name, const char* docs[][2])
|
||||
void cmDocumentation::AppendSection(const char* name,
|
||||
std::vector<cmDocumentationEntry>& docs)
|
||||
{
|
||||
cmDocumentationSection* sec = CM_NULLPTR;
|
||||
cmDocumentationSection* sec = nullptr;
|
||||
if (this->AllSections.find(name) == this->AllSections.end()) {
|
||||
sec =
|
||||
new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user