diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2014-03-09 21:14:26 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2014-03-09 21:14:26 +0100 |
| commit | d802d392811be44d34ae9cd23f616db93e54c50f (patch) | |
| tree | f9aa8831a0731ea246bd921d979f4bffa7f07bd0 /Source/Core/DiscIO/VolumeCreator.cpp | |
| parent | f28116b7da6aac6069084596dc4dbf866bdebfd8 (diff) | |
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
Diffstat (limited to 'Source/Core/DiscIO/VolumeCreator.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeCreator.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/DiscIO/VolumeCreator.cpp b/Source/Core/DiscIO/VolumeCreator.cpp index eb2d24e4f5..a223c263ea 100644 --- a/Source/Core/DiscIO/VolumeCreator.cpp +++ b/Source/Core/DiscIO/VolumeCreator.cpp @@ -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) |
