aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-03-22 07:07:47 +0100
committerEugene Sandulenko2016-05-10 09:54:21 +0200
commit5ecf00826028b4d3ee6d64f1a4fe67839b34bc43 (patch)
treea77decc20ca050cf274a96b8eb7cd052c0461bf4
parentc4f5dd0209a42ef5d3f6cfe81a83c98f0d9853f5 (diff)
downloadscummvm-rg350-5ecf00826028b4d3ee6d64f1a4fe67839b34bc43.tar.gz
scummvm-rg350-5ecf00826028b4d3ee6d64f1a4fe67839b34bc43.tar.bz2
scummvm-rg350-5ecf00826028b4d3ee6d64f1a4fe67839b34bc43.zip
GNAP: Use nullptr instead of 0 for some pointers
-rw-r--r--engines/gnap/gamesys.cpp4
-rw-r--r--engines/gnap/resource.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp
index 5a72428fb8..d3e1195f4a 100644
--- a/engines/gnap/gamesys.cpp
+++ b/engines/gnap/gamesys.cpp
@@ -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) {
diff --git a/engines/gnap/resource.h b/engines/gnap/resource.h
index 2ae933f3f7..20dd8d4192 100644
--- a/engines/gnap/resource.h
+++ b/engines/gnap/resource.h
@@ -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);