clang-modernize -use-nullptr

and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
Tillmann Karras 2014-03-09 21:14:26 +01:00
parent f28116b7da
commit d802d39281
292 changed files with 1526 additions and 1526 deletions

View file

@ -75,8 +75,8 @@ EDiscType GetDiscType(IBlobReader& _rReader);
IVolume* CreateVolumeFromFilename(const std::string& _rFilename, u32 _PartitionGroup, u32 _VolumeNum)
{
IBlobReader* pReader = CreateBlobReader(_rFilename.c_str());
if (pReader == NULL)
return NULL;
if (pReader == nullptr)
return nullptr;
switch (GetDiscType(*pReader))
{
@ -94,7 +94,7 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename, u32 _PartitionG
IVolume* pVolume = CreateVolumeFromCryptedWiiImage(*pReader, _PartitionGroup, 0, _VolumeNum, region == 'K');
if (pVolume == NULL)
if (pVolume == nullptr)
{
delete pReader;
}
@ -106,16 +106,16 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename, u32 _PartitionG
case DISC_TYPE_UNK:
default:
std::string Filename, ext;
SplitPath(_rFilename, NULL, &Filename, &ext);
SplitPath(_rFilename, nullptr, &Filename, &ext);
Filename += ext;
NOTICE_LOG(DISCIO, "%s does not have the Magic word for a gcm, wiidisc or wad file\n"
"Set Log Verbosity to Warning and attempt to load the game again to view the values", Filename.c_str());
delete pReader;
return NULL;
return nullptr;
}
// unreachable code
return NULL;
return nullptr;
}
IVolume* CreateVolumeFromDirectory(const std::string& _rDirectory, bool _bIsWii, const std::string& _rApploader, const std::string& _rDOL)
@ -123,7 +123,7 @@ IVolume* CreateVolumeFromDirectory(const std::string& _rDirectory, bool _bIsWii,
if (CVolumeDirectory::IsValidDirectory(_rDirectory))
return new CVolumeDirectory(_rDirectory, _bIsWii, _rApploader, _rDOL);
return NULL;
return nullptr;
}
bool IsVolumeWiiDisc(const IVolume *_rVolume)
@ -152,7 +152,7 @@ static IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _Part
// Check if we're looking for a valid partition
if ((int)_VolumeNum != -1 && _VolumeNum > numPartitions)
return NULL;
return nullptr;
#ifdef _WIN32
struct SPartition
@ -217,7 +217,7 @@ static IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _Part
}
}
return NULL;
return nullptr;
}
EDiscType GetDiscType(IBlobReader& _rReader)