aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Boutonné2010-12-20 17:40:19 +0000
committerArnaud Boutonné2010-12-20 17:40:19 +0000
commit39fec99f2688d89d728ee4681ded08fa0d812d1a (patch)
tree6f9a14ca2b1e82eb2cdf50980fda2646aee19335
parent6308dd77d69cd2f33e84cc06058e2d707a67a1b6 (diff)
downloadscummvm-rg350-39fec99f2688d89d728ee4681ded08fa0d812d1a.tar.gz
scummvm-rg350-39fec99f2688d89d728ee4681ded08fa0d812d1a.tar.bz2
scummvm-rg350-39fec99f2688d89d728ee4681ded08fa0d812d1a.zip
HUGO: Fix several warnings reported by CppCheck
svn-id: r54979
-rw-r--r--engines/hugo/file_v2d.cpp2
-rw-r--r--engines/hugo/file_v3d.cpp4
-rw-r--r--engines/hugo/object_v1d.cpp4
3 files changed, 4 insertions, 6 deletions
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index baf7f4c97f..c868f99e3c 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -145,7 +145,7 @@ void FileManager_v2d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy
do {
int8 data = _sceneryArchive1.readByte(); // Read a code byte
if ((byte)data == 0x80) // Noop
- k = k;
+ ;
else if (data >= 0) { // Copy next data+1 literally
for (i = 0; i <= (byte)data; i++, k++)
*tmpImage++ = _sceneryArchive1.readByte();
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index e98b4cc013..036b46f1f3 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -154,7 +154,7 @@ void FileManager_v3d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy
do {
int8 data = _sceneryArchive1.readByte();// Read a code byte
if ((byte)data == 0x80) // Noop
- k = k;
+ ;
else if (data >= 0) { // Copy next data+1 literally
for (i = 0; i <= (byte)data; i++, k++)
*tmpImage++ = _sceneryArchive1.readByte();
@@ -194,7 +194,7 @@ void FileManager_v3d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy
do {
int8 data = _sceneryArchive2.readByte();// Read a code byte
if ((byte)data == 0x80) // Noop
- k = k;
+ ;
else if (data >= 0) { // Copy next data+1 literally
for (i = 0; i <= (byte)data; i++, k++)
*tmpImage++ = _sceneryArchive2.readByte();
diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp
index 13233eb8df..fa0283665c 100644
--- a/engines/hugo/object_v1d.cpp
+++ b/engines/hugo/object_v1d.cpp
@@ -178,7 +178,7 @@ void ObjectHandler_v1d::updateImages() {
void ObjectHandler_v1d::moveObjects() {
debugC(4, kDebugObject, "moveObjects");
- static int dxOld, dyOld; // previous directions for CHASEing
+ static int dxOld; // previous direction for CHASEing
// Added to DOS version in order to handle mouse properly
// If route mode enabled, do special route processing
@@ -231,7 +231,6 @@ void ObjectHandler_v1d::moveObjects() {
_vm->boundaryCollision(obj); // Must have got hero!
}
dxOld = obj->vx;
- dyOld = obj->vy;
currImage = obj->currImagePtr; // Get (new) ptr to current image
break;
}
@@ -262,7 +261,6 @@ void ObjectHandler_v1d::moveObjects() {
obj->cycling = NOT_CYCLING;
}
dxOld = obj->vx;
- dyOld = obj->vy;
currImage = obj->currImagePtr; // Get (new) ptr to current image
}
break;