diff options
Diffstat (limited to 'common/macresman.cpp')
-rw-r--r-- | common/macresman.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp index adca1ea10b..553b138717 100644 --- a/common/macresman.cpp +++ b/common/macresman.cpp @@ -67,9 +67,9 @@ void MacResManager::close() { delete[] _resLists[i]; } - delete[] _resLists; _resLists = 0; - delete[] _resTypes; _resTypes = 0; - delete _stream; _stream = 0; + delete[] _resLists; _resLists = nullptr; + delete[] _resTypes; _resTypes = nullptr; + delete _stream; _stream = nullptr; _resMap.numTypes = 0; } @@ -463,7 +463,7 @@ bool MacResManager::load(SeekableReadStream &stream) { SeekableReadStream *MacResManager::getDataFork() { if (!_stream) - return NULL; + return nullptr; if (_mode == kResForkMacBinary) { _stream->seek(MBI_DFLEN); @@ -476,7 +476,7 @@ SeekableReadStream *MacResManager::getDataFork() { return file; delete file; - return NULL; + return nullptr; } MacResIDArray MacResManager::getResIDArray(uint32 typeID) { @@ -544,7 +544,7 @@ SeekableReadStream *MacResManager::getResource(uint32 typeID, uint16 resID) { } if (typeNum == -1) - return NULL; + return nullptr; for (int i = 0; i < _resTypes[typeNum].items; i++) if (_resLists[typeNum][i].id == resID) { @@ -553,14 +553,14 @@ SeekableReadStream *MacResManager::getResource(uint32 typeID, uint16 resID) { } if (resNum == -1) - return NULL; + return nullptr; _stream->seek(_dataOffset + _resLists[typeNum][resNum].dataOffset); uint32 len = _stream->readUint32BE(); // Ignore resources with 0 length if (!len) - return 0; + return nullptr; return _stream->readStream(len); } @@ -574,14 +574,14 @@ SeekableReadStream *MacResManager::getResource(const String &fileName) { // Ignore resources with 0 length if (!len) - return 0; + return nullptr; return _stream->readStream(len); } } } - return 0; + return nullptr; } SeekableReadStream *MacResManager::getResource(uint32 typeID, const String &fileName) { @@ -596,14 +596,14 @@ SeekableReadStream *MacResManager::getResource(uint32 typeID, const String &file // Ignore resources with 0 length if (!len) - return 0; + return nullptr; return _stream->readStream(len); } } } - return 0; + return nullptr; } void MacResManager::readMap() { @@ -640,7 +640,7 @@ void MacResManager::readMap() { resPtr->nameOffset = _stream->readUint16BE(); resPtr->dataOffset = _stream->readUint32BE(); _stream->readUint32BE(); - resPtr->name = 0; + resPtr->name = nullptr; resPtr->attr = resPtr->dataOffset >> 24; resPtr->dataOffset &= 0xFFFFFF; |