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

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Thu Feb 1 21:16:32 CET 2007


Revision: 25327
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25327&view=rev
Author:   eriktorbjorn
Date:     2007-02-01 12:16:32 -0800 (Thu, 01 Feb 2007)

Log Message:
-----------
Used Fingolfin's workaround for a bogus (?) warning produced by some versions
of GCC. (Not the one he's using, though, which is why I'm doing this instead.)

Modified Paths:
--------------
    scummvm/trunk/engines/cine/texte.cpp
    scummvm/trunk/engines/lure/menu.cpp
    scummvm/trunk/engines/lure/surface.cpp
    scummvm/trunk/engines/parallaction/animation.cpp
    scummvm/trunk/engines/parallaction/commands.cpp
    scummvm/trunk/engines/parallaction/dialogue.cpp
    scummvm/trunk/engines/parallaction/location.cpp
    scummvm/trunk/engines/parallaction/zone.cpp

Modified: scummvm/trunk/engines/cine/texte.cpp
===================================================================
--- scummvm/trunk/engines/cine/texte.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/cine/texte.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -573,7 +573,7 @@
 			ptr[i] = (char *)ptr + (sizeof(char *) * 6 * 4) + 60 * i;
 			in.read(ptr[i], 60);
 		}
-		failureMessages = (const char **)ptr;
+		failureMessages = const_cast<const char **>(ptr);
 
 		in.close();
 	} else {

Modified: scummvm/trunk/engines/lure/menu.cpp
===================================================================
--- scummvm/trunk/engines/lure/menu.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/lure/menu.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -245,7 +245,7 @@
 		}
 	}
 	
-	uint16 result = Show(numItems, (const char **) itemNames);
+	uint16 result = Show(numItems, const_cast<const char **>(itemNames));
 	if (result != 0xffff) result = idList[result];
 
 	for (itemCtr = 0; itemCtr < numItems; ++itemCtr)
@@ -351,7 +351,7 @@
 		return 0xfffe;
 
 	// Display items
-	uint16 result = Show(numItems, (const char **) entryNames);
+	uint16 result = Show(numItems, const_cast<const char **>(entryNames));
 	if (result != 0xffff) result = entryIds[result];
 
 	// Deallocate display strings

Modified: scummvm/trunk/engines/lure/surface.cpp
===================================================================
--- scummvm/trunk/engines/lure/surface.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/lure/surface.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -371,7 +371,7 @@
 	wordWrap(lineCopy, width - (DIALOG_EDGE_SIZE + 3) * 2, lines, numLines);
 
 	// Create the dialog 
-	Surface *result = newDialog(width, numLines, (const char **) lines, true, colour);
+	Surface *result = newDialog(width, numLines, const_cast<const char **>(lines), true, colour);
 
 	// Deallocate used resources
 	free(lines);

Modified: scummvm/trunk/engines/parallaction/animation.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/animation.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/parallaction/animation.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -98,7 +98,7 @@
 		}
 		if (!scumm_stricmp(_tokens[0], "type")) {
 			if (_tokens[2][0] != '\0') {
-				vD0->_zone._type = ((4 + searchTable(_tokens[2], (const char **)_objectsNames)) << 16) & 0xFFFF0000;
+				vD0->_zone._type = ((4 + searchTable(_tokens[2], const_cast<const char **>(_objectsNames))) << 16) & 0xFFFF0000;
 			}
 			int16 _si = searchTable(_tokens[1], _zoneTypeNames);
 			if (_si != -1) {

Modified: scummvm/trunk/engines/parallaction/commands.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/commands.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/parallaction/commands.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -68,9 +68,9 @@
 		case CMD_SET:	// set
 		case CMD_CLEAR: // clear
 		case CMD_TOGGLE:	// toggle
-			if (_vm->searchTable(_tokens[1], (const char **)_globalTable) == -1) {
+			if (_vm->searchTable(_tokens[1], const_cast<const char **>(_globalTable)) == -1) {
 				do {
-					char _al = _vm->searchTable(_tokens[_si], (const char **)_localFlagNames);
+					char _al = _vm->searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames));
 					_si++;
 					cmd->u._flags |= 1 << (_al - 1);
 				} while (!scumm_stricmp(_tokens[_si++], "|"));
@@ -78,7 +78,7 @@
 			} else {
 				cmd->u._flags |= kFlagsGlobal;
 				do {
-					char _al = _vm->searchTable(_tokens[1], (const char **)_globalTable);
+					char _al = _vm->searchTable(_tokens[1], const_cast<const char **>(_globalTable));
 					_si++;
 					cmd->u._flags |= 1 << (_al - 1);
 				} while (!scumm_stricmp(_tokens[_si++], "|"));
@@ -119,7 +119,7 @@
 			break;
 
 		case CMD_DROP:	// drop
-			cmd->u._object = _vm->searchTable(_tokens[_si], (const char **)_objectsNames);
+			cmd->u._object = _vm->searchTable(_tokens[_si], const_cast<const char **>(_objectsNames));
 			_si++;
 			break;
 
@@ -146,10 +146,10 @@
 					cmd->_flagsOn |= kFlagsEnter;
 				} else
 				if (!scumm_strnicmp(_tokens[_si], "no", 2)) {
-					byte _al = _vm->searchTable(&_tokens[_si][2], (const char **)_localFlagNames);
+					byte _al = _vm->searchTable(&_tokens[_si][2], const_cast<const char **>(_localFlagNames));
 					cmd->_flagsOff |= 1 << (_al - 1);
 				} else {
-					byte _al = _vm->searchTable(_tokens[_si], (const char **)_localFlagNames);
+					byte _al = _vm->searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames));
 					cmd->_flagsOn |= 1 << (_al - 1);
 				}
 
@@ -171,10 +171,10 @@
 					cmd->_flagsOn |= kFlagsEnter;
 				} else
 				if (!scumm_strnicmp(_tokens[_si], "no", 2)) {
-					byte _al = _vm->searchTable(&_tokens[_si][2], (const char **)_globalTable);
+					byte _al = _vm->searchTable(&_tokens[_si][2], const_cast<const char **>(_globalTable));
 					cmd->_flagsOff |= 1 << (_al - 1);
 				} else {
-					byte _al = _vm->searchTable(_tokens[_si], (const char **)_localFlagNames);
+					byte _al = _vm->searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames));
 					cmd->_flagsOn |= 1 << (_al - 1);
 				}
 

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -93,14 +93,14 @@
 		parseFillBuffers();
 		while (scumm_stricmp(_tokens[0], "endquestion")) {	// parse answers
 
-			const char** v60 = (const char **)_localFlagNames;
+			const char** v60 = const_cast<const char **>(_localFlagNames);
 			uint16 v56 = 1;
 
 			if (_tokens[1][0]) {
 
 				if (!scumm_stricmp(_tokens[1], "global")) {
 					v56 = 2;
-					v60 = (const char **)_globalTable;
+					v60 = const_cast<const char **>(_globalTable);
 					vB4->_yesFlags[_di] |= kFlagsGlobal;
 				}
 
@@ -149,7 +149,7 @@
 		for (uint16 v5A = 0; v5A < 5; v5A++) {
 			if (_questions[_si]->_answers[v5A] == 0) continue;
 
-			int16 v58 = _vm->searchTable(_questions[_si]->_following._names[v5A], (const char **)_questions_names);
+			int16 v58 = _vm->searchTable(_questions[_si]->_following._names[v5A], const_cast<const char **>(_questions_names));
 			memFree(_questions[_si]->_following._names[v5A]);
 
 			if (v58 == -1) {

Modified: scummvm/trunk/engines/parallaction/location.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/location.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/parallaction/location.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -150,7 +150,7 @@
 				_si = 1;
 
 				do {
-					byte _al = searchTable(_tokens[_si], (const char **)_localFlagNames);
+					byte _al = searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames));
 					_localFlags[_currentLocationIndex] |= 1 << (_al - 1);
 
 					_si++;

Modified: scummvm/trunk/engines/parallaction/zone.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/zone.cpp	2007-02-01 20:13:46 UTC (rev 25326)
+++ scummvm/trunk/engines/parallaction/zone.cpp	2007-02-01 20:16:32 UTC (rev 25327)
@@ -86,7 +86,7 @@
 		}
 		if (!scumm_stricmp(_tokens[0], "type")) {
 			if (_tokens[2][0] != '\0') {
-				z->_type = (4 + searchTable(_tokens[2], (const char **)_objectsNames)) << 16;
+				z->_type = (4 + searchTable(_tokens[2], const_cast<const char **>(_objectsNames))) << 16;
 			}
 			int16 _si = searchTable(_tokens[1], _zoneTypeNames);
 			if (_si != -1) {
@@ -307,19 +307,19 @@
 			}
 
 			if (!scumm_stricmp(_tokens[0], "icon")) {
-				u->get->_icon = 4 + searchTable(_tokens[1], (const char **)_objectsNames);
+				u->get->_icon = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames));
 			}
 			break;
 
 		case kZoneMerge: // merge Zone init
 			if (!scumm_stricmp(_tokens[0], "obj1")) {
-				u->merge->_obj1 = 4 + searchTable(_tokens[1], (const char **)_objectsNames);
+				u->merge->_obj1 = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames));
 			}
 			if (!scumm_stricmp(_tokens[0], "obj2")) {
-				u->merge->_obj2 = 4 + searchTable(_tokens[1], (const char **)_objectsNames);
+				u->merge->_obj2 = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames));
 			}
 			if (!scumm_stricmp(_tokens[0], "newobj")) {
-				u->merge->_obj3 = 4 + searchTable(_tokens[1], (const char **)_objectsNames);
+				u->merge->_obj3 = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames));
 			}
 			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