[Scummvm-cvs-logs] scummvm master -> 194c0491394e40eec7f288489f586235e02397ac

lordhoto lordhoto at gmail.com
Sun Jan 29 16:17:54 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
194c049139 KYRA: Prevent unnecessary removal of const in some casts.


Commit: 194c0491394e40eec7f288489f586235e02397ac
    https://github.com/scummvm/scummvm/commit/194c0491394e40eec7f288489f586235e02397ac
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-01-29T07:15:27-08:00

Commit Message:
KYRA: Prevent unnecessary removal of const in some casts.

Changed paths:
    engines/kyra/gui_eob.cpp
    engines/kyra/staticres_eob.cpp



diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 611eab1..5c2c3e5 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -3781,7 +3781,7 @@ void GUI_EoB::drawMenuButton(Button *b, bool clicked, bool highlight, bool noFil
 	if (!b)
 		return;
 
-	EoBMenuButtonDef *d = (EoBMenuButtonDef *)b->extButtonDef;
+	const EoBMenuButtonDef *d = (const EoBMenuButtonDef *)b->extButtonDef;
 
 	if (d->flags & 1)
 		drawMenuButtonBox(b->x, b->y, b->width, b->height, clicked, noFill);
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index ce43d22..638a185 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -369,13 +369,13 @@ void EoBCoreEngine::initStaticResource() {
 	_mnWord = _staticres->loadStrings(kEoBBaseManWord, _mnNumWord);
 	_mnPrompt = _staticres->loadStrings(kEoBBaseManPrompt, temp);
 
-	_monsterStepTable0 = (int8 *)_staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEoBBaseMonsterStepTable02 : kEoBBaseMonsterStepTable01, temp);
-	_monsterStepTable1 = (int8 *)_staticres->loadRawData(kEoBBaseMonsterStepTable1, temp);
-	_monsterStepTable2 = (int8 *)_staticres->loadRawData(kEoBBaseMonsterStepTable2, temp);
-	_monsterStepTable3 = (int8 *)_staticres->loadRawData(kEoBBaseMonsterStepTable3, temp);
+	_monsterStepTable0 = (const int8 *)_staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEoBBaseMonsterStepTable02 : kEoBBaseMonsterStepTable01, temp);
+	_monsterStepTable1 = (const int8 *)_staticres->loadRawData(kEoBBaseMonsterStepTable1, temp);
+	_monsterStepTable2 = (const int8 *)_staticres->loadRawData(kEoBBaseMonsterStepTable2, temp);
+	_monsterStepTable3 = (const int8 *)_staticres->loadRawData(kEoBBaseMonsterStepTable3, temp);
 	_monsterCloseAttPosTable1 = _staticres->loadRawData(kEoBBaseMonsterCloseAttPosTable1, temp);
 	_monsterCloseAttPosTable2 = _staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEoBBaseMonsterCloseAttPosTable22 : kEoBBaseMonsterCloseAttPosTable21, temp);
-	_monsterCloseAttUnkTable = (int8 *)_staticres->loadRawData(kEoBBaseMonsterCloseAttUnkTable, temp);
+	_monsterCloseAttUnkTable = (const int8 *)_staticres->loadRawData(kEoBBaseMonsterCloseAttUnkTable, temp);
 	_monsterCloseAttChkTable1 = _staticres->loadRawData(kEoBBaseMonsterCloseAttChkTable1, temp);
 	_monsterCloseAttChkTable2 = _staticres->loadRawData(kEoBBaseMonsterCloseAttChkTable2, temp);
 	_monsterCloseAttDstTable1 = _staticres->loadRawData(kEoBBaseMonsterCloseAttDstTable1, temp);






More information about the Scummvm-git-logs mailing list