Use C++ language supported 'nullptr' (#13944)

This commit is contained in:
Scott Lahteine
2019-05-09 11:45:55 -05:00
committed by GitHub
parent e53d7e5517
commit ad4ffa1d2f
70 changed files with 670 additions and 668 deletions

View File

@@ -81,7 +81,7 @@ bool SdBaseFile::addDirCluster() {
// cache a file's directory entry
// return pointer to cached entry or null for failure
dir_t* SdBaseFile::cacheDirEntry(uint8_t action) {
if (!vol_->cacheRawBlock(dirBlock_, action)) return NULL;
if (!vol_->cacheRawBlock(dirBlock_, action)) return nullptr;
return vol_->cache()->dir + dirIndex_;
}
@@ -841,7 +841,7 @@ bool SdBaseFile::openParent(SdBaseFile* dir) {
// search for parent in '../..'
do {
if (file.readDir(&entry, NULL) != 32) return false;
if (file.readDir(&entry, nullptr) != 32) return false;
c = entry.firstClusterLow;
c |= (uint32_t)entry.firstClusterHigh << 16;
} while (c != cluster);