use CM_NULLPTR
This commit is contained in:
parent
bfdf1322e7
commit
0039ffa216
|
@ -52,8 +52,9 @@ public:
|
||||||
* @arg outputPrefix optional string to prepend to the result
|
* @arg outputPrefix optional string to prepend to the result
|
||||||
* @arg outputSuffix optional string to append to the result
|
* @arg outputSuffix optional string to append to the result
|
||||||
*/
|
*/
|
||||||
std::string get(const std::string& filePath, const char* outputPrefix = NULL,
|
std::string get(const std::string& filePath,
|
||||||
const char* outputSuffix = NULL);
|
const char* outputPrefix = CM_NULLPTR,
|
||||||
|
const char* outputSuffix = CM_NULLPTR);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initParentDirs(const std::string& currentSrcDir,
|
void initParentDirs(const std::string& currentSrcDir,
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
|
|
||||||
cmXMLParser::cmXMLParser()
|
cmXMLParser::cmXMLParser()
|
||||||
{
|
{
|
||||||
this->Parser = 0;
|
this->Parser = CM_NULLPTR;
|
||||||
this->ParseError = 0;
|
this->ParseError = 0;
|
||||||
this->ReportCallback = 0;
|
this->ReportCallback = CM_NULLPTR;
|
||||||
this->ReportCallbackData = 0;
|
this->ReportCallbackData = CM_NULLPTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmXMLParser::~cmXMLParser()
|
cmXMLParser::~cmXMLParser()
|
||||||
|
@ -64,7 +64,7 @@ int cmXMLParser::InitializeParser()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the expat XML parser.
|
// Create the expat XML parser.
|
||||||
this->Parser = XML_ParserCreate(0);
|
this->Parser = XML_ParserCreate(CM_NULLPTR);
|
||||||
XML_SetElementHandler(static_cast<XML_Parser>(this->Parser),
|
XML_SetElementHandler(static_cast<XML_Parser>(this->Parser),
|
||||||
&cmXMLParserStartElement, &cmXMLParserEndElement);
|
&cmXMLParserStartElement, &cmXMLParserEndElement);
|
||||||
XML_SetCharacterDataHandler(static_cast<XML_Parser>(this->Parser),
|
XML_SetCharacterDataHandler(static_cast<XML_Parser>(this->Parser),
|
||||||
|
@ -108,7 +108,7 @@ int cmXMLParser::CleanupParser()
|
||||||
|
|
||||||
// Clean up the parser.
|
// Clean up the parser.
|
||||||
XML_ParserFree(static_cast<XML_Parser>(this->Parser));
|
XML_ParserFree(static_cast<XML_Parser>(this->Parser));
|
||||||
this->Parser = 0;
|
this->Parser = CM_NULLPTR;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ const char* cmXMLParser::FindAttribute(const char** atts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return CM_NULLPTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmXMLParserStartElement(void* parser, const char* name, const char** atts)
|
void cmXMLParserStartElement(void* parser, const char* name, const char** atts)
|
||||||
|
|
|
@ -148,7 +148,8 @@ int main()
|
||||||
it != end; ++it) {
|
it != end; ++it) {
|
||||||
std::vector<std::string> command;
|
std::vector<std::string> command;
|
||||||
cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command);
|
cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command);
|
||||||
if (!cmSystemTools::RunSingleCommand(command, 0, 0, 0,
|
if (!cmSystemTools::RunSingleCommand(command, CM_NULLPTR, CM_NULLPTR,
|
||||||
|
CM_NULLPTR,
|
||||||
it->at("directory").c_str())) {
|
it->at("directory").c_str())) {
|
||||||
std::cout << "ERROR: Failed to run command \"" << command[0] << "\""
|
std::cout << "ERROR: Failed to run command \"" << command[0] << "\""
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static test_pair const pairs[] = {
|
||||||
{ "angles <>", "angles <>" },
|
{ "angles <>", "angles <>" },
|
||||||
{ "ampersand &", "ampersand &" },
|
{ "ampersand &", "ampersand &" },
|
||||||
{ "bad-byte \x80", "bad-byte [NON-UTF-8-BYTE-0x80]" },
|
{ "bad-byte \x80", "bad-byte [NON-UTF-8-BYTE-0x80]" },
|
||||||
{ 0, 0 }
|
{ CM_NULLPTR, CM_NULLPTR }
|
||||||
};
|
};
|
||||||
|
|
||||||
int testXMLSafe(int /*unused*/, char* /*unused*/ [])
|
int testXMLSafe(int /*unused*/, char* /*unused*/ [])
|
||||||
|
|
Loading…
Reference in New Issue