aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
authorMax Horn2010-11-03 00:19:28 +0000
committerMax Horn2010-11-03 00:19:28 +0000
commit0c018bf3923a142d239e97f482165c3e0daed90e (patch)
tree50a9be32003005d0fd67ac0e1f09d6bb83ac262a /engines/sword25/gfx
parentc6ddf220579955793c428f3169bb8dfc736da555 (diff)
downloadscummvm-rg350-0c018bf3923a142d239e97f482165c3e0daed90e.tar.gz
scummvm-rg350-0c018bf3923a142d239e97f482165c3e0daed90e.tar.bz2
scummvm-rg350-0c018bf3923a142d239e97f482165c3e0daed90e.zip
SWORD25: cleanup
svn-id: r54045
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r--engines/sword25/gfx/graphicengine.cpp3
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp3
-rw-r--r--engines/sword25/gfx/image/swimage.cpp3
3 files changed, 6 insertions, 3 deletions
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index f629993abf..44b9932de1 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -309,7 +309,8 @@ Resource *GraphicEngine::loadResource(const Common::String &filename) {
// Datei laden
byte *pFileData;
uint fileSize;
- if (!(pFileData = static_cast<byte *>(pPackage->getFile(filename, &fileSize)))) {
+ pFileData = pPackage->getFile(filename, &fileSize);
+ if (!pFileData) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
return 0;
}
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index 9392eca044..fb82f893c6 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -64,7 +64,8 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
// Datei laden
byte *pFileData;
uint fileSize;
- if (!(pFileData = (byte *)pPackage->getFile(filename, &fileSize))) {
+ pFileData = pPackage->getFile(filename, &fileSize);
+ if (!pFileData) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
return;
}
diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp
index f0a8899bb6..84aa35b0f4 100644
--- a/engines/sword25/gfx/image/swimage.cpp
+++ b/engines/sword25/gfx/image/swimage.cpp
@@ -53,7 +53,8 @@ SWImage::SWImage(const Common::String &filename, bool &result) :
// Datei laden
byte *pFileData;
uint fileSize;
- if (!(pFileData = (byte *)pPackage->getFile(filename, &fileSize))) {
+ pFileData = pPackage->getFile(filename, &fileSize);
+ if (!pFileData) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str());
return;
}