[Scummvm-cvs-logs] SF.net SVN: scummvm:[54979] scummvm/trunk/engines/hugo

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Mon Dec 20 18:40:19 CET 2010


Revision: 54979
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54979&view=rev
Author:   strangerke
Date:     2010-12-20 17:40:19 +0000 (Mon, 20 Dec 2010)

Log Message:
-----------
HUGO: Fix several warnings reported by CppCheck

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/file_v2d.cpp
    scummvm/trunk/engines/hugo/file_v3d.cpp
    scummvm/trunk/engines/hugo/object_v1d.cpp

Modified: scummvm/trunk/engines/hugo/file_v2d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file_v2d.cpp	2010-12-20 17:28:17 UTC (rev 54978)
+++ scummvm/trunk/engines/hugo/file_v2d.cpp	2010-12-20 17:40:19 UTC (rev 54979)
@@ -145,7 +145,7 @@
 	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();

Modified: scummvm/trunk/engines/hugo/file_v3d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file_v3d.cpp	2010-12-20 17:28:17 UTC (rev 54978)
+++ scummvm/trunk/engines/hugo/file_v3d.cpp	2010-12-20 17:40:19 UTC (rev 54979)
@@ -154,7 +154,7 @@
 		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 @@
 		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();

Modified: scummvm/trunk/engines/hugo/object_v1d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/object_v1d.cpp	2010-12-20 17:28:17 UTC (rev 54978)
+++ scummvm/trunk/engines/hugo/object_v1d.cpp	2010-12-20 17:40:19 UTC (rev 54979)
@@ -178,7 +178,7 @@
 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 @@
 					_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 @@
 							obj->cycling = NOT_CYCLING;
 					}
 					dxOld = obj->vx;
-					dyOld = obj->vy;
 					currImage = obj->currImagePtr;  // Get (new) ptr to current image
 				}
 				break;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list