Use C++11 nullptr

This commit is contained in:
Daniel Pfeifer
2017-08-22 23:42:36 +02:00
parent fe19fda2aa
commit 5962db4389
235 changed files with 1167 additions and 1214 deletions
+5 -5
View File
@@ -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 += ".";