aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-02-01 20:16:32 +0000
committerTorbjörn Andersson2007-02-01 20:16:32 +0000
commit0a18259d78f59a79270467a6fa70172e5d96b625 (patch)
treec2c582918f20c248fc1bc7a17c8fd59de7351d1f
parent586a01d03807cd870b4f6cf6467d88bd8f1ea3d9 (diff)
downloadscummvm-rg350-0a18259d78f59a79270467a6fa70172e5d96b625.tar.gz
scummvm-rg350-0a18259d78f59a79270467a6fa70172e5d96b625.tar.bz2
scummvm-rg350-0a18259d78f59a79270467a6fa70172e5d96b625.zip
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.) svn-id: r25327
-rw-r--r--engines/cine/texte.cpp2
-rw-r--r--engines/lure/menu.cpp4
-rw-r--r--engines/lure/surface.cpp2
-rw-r--r--engines/parallaction/animation.cpp2
-rw-r--r--engines/parallaction/commands.cpp16
-rw-r--r--engines/parallaction/dialogue.cpp6
-rw-r--r--engines/parallaction/location.cpp2
-rw-r--r--engines/parallaction/zone.cpp10
8 files changed, 22 insertions, 22 deletions
diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp
index b1b959a80c..226dda2eb6 100644
--- a/engines/cine/texte.cpp
+++ b/engines/cine/texte.cpp
@@ -573,7 +573,7 @@ void loadErrmessDat(const char *fname) {
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 {
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 72ce50389e..b2f07b57f2 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -245,7 +245,7 @@ uint16 PopupMenu::ShowInventory() {
}
}
- 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 @@ uint16 PopupMenu::ShowItems(Action contextAction) {
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
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index 4eec088fdf..0065c608fc 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -371,7 +371,7 @@ Surface *Surface::newDialog(uint16 width, const char *line, uint8 colour) {
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);
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp
index 28ad30ae81..fa68f47562 100644
--- a/engines/parallaction/animation.cpp
+++ b/engines/parallaction/animation.cpp
@@ -98,7 +98,7 @@ Animation *Parallaction::parseAnimation(ArchivedFile *file, Node *list, char *na
}
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) {
diff --git a/engines/parallaction/commands.cpp b/engines/parallaction/commands.cpp
index d478f81b13..2f9005136e 100644
--- a/engines/parallaction/commands.cpp
+++ b/engines/parallaction/commands.cpp
@@ -68,9 +68,9 @@ Command *parseCommands(ArchivedFile *file) {
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 @@ Command *parseCommands(ArchivedFile *file) {
} 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 @@ Command *parseCommands(ArchivedFile *file) {
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 @@ Command *parseCommands(ArchivedFile *file) {
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 @@ Command *parseCommands(ArchivedFile *file) {
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);
}
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index a6c1f328c4..2ba01c700f 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -93,14 +93,14 @@ Dialogue *parseDialogue(ArchivedFile *file) {
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 @@ Dialogue *parseDialogue(ArchivedFile *file) {
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) {
diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp
index d41cc65617..a1fd1f42d6 100644
--- a/engines/parallaction/location.cpp
+++ b/engines/parallaction/location.cpp
@@ -150,7 +150,7 @@ void Parallaction::parseLocation(const char *filename) {
_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++;
diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp
index ceb4c499ee..f8cb9da8a1 100644
--- a/engines/parallaction/zone.cpp
+++ b/engines/parallaction/zone.cpp
@@ -86,7 +86,7 @@ void Parallaction::parseZone(ArchivedFile *file, Node *list, char *name) {
}
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 @@ void Parallaction::parseZoneTypeBlock(ArchivedFile *file, Zone *z) {
}
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;