GNAP: Use nullptr instead of 0 for some pointers

This commit is contained in:
Strangerke 2016-03-22 07:07:47 +01:00 committed by Eugene Sandulenko
parent c4f5dd0209
commit 5ecf008260
2 changed files with 4 additions and 4 deletions

View File

@ -360,7 +360,7 @@ int GameSys::getSpriteHeightById(int resourceId) {
Graphics::Surface *GameSys::loadBitmap(int resourceId) {
debug("GameSys::loadBitmap() resourceId: %08X", resourceId);
if (_vm->_dat->getResourceType(resourceId) != 1)
return 0;
return nullptr;
byte *resourceData = _vm->_dat->loadResource(resourceId);
uint32 resourceSize = _vm->_dat->getResourceSize(resourceId);
Common::MemoryReadStream stream(resourceData, resourceSize, DisposeAfterUse::NO);
@ -406,7 +406,7 @@ Sequence *GameSys::seqFind(int sequenceId, int id, int *outIndex) {
*outIndex = i;
return &_seqItems[i];
}
return 0;
return nullptr;
}
int GameSys::seqLocateGfx(int sequenceId, int id, int *outGfxIndex) {

View File

@ -169,13 +169,13 @@ protected:
CacheMapIterator it = _cache.find(resourceId);
if (it != _cache.end())
return it->_value;
return 0;
return nullptr;
}
ResourceClass *load(int resourceId) {
if (_dat->getResourceType(resourceId) != ResourceType) {
error("ResourceCache::load() Wrong resource type: Expected %d, got %d", ResourceType, _dat->getResourceType(resourceId));
return 0;
return nullptr;
}
byte *resourceData = _dat->loadResource(resourceId);
uint32 resourceSize = _dat->getResourceSize(resourceId);