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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Feb 15 21:19:06 CET 2009


Revision: 38287
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38287&view=rev
Author:   lordhoto
Date:     2009-02-15 20:19:06 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Fixed compilation (along with it const correctness).

Modified Paths:
--------------
    scummvm/trunk/engines/cine/script.h
    scummvm/trunk/engines/cine/script_fw.cpp
    scummvm/trunk/engines/cine/script_os.cpp

Modified: scummvm/trunk/engines/cine/script.h
===================================================================
--- scummvm/trunk/engines/cine/script.h	2009-02-15 20:15:24 UTC (rev 38286)
+++ scummvm/trunk/engines/cine/script.h	2009-02-15 20:19:06 UTC (rev 38287)
@@ -47,7 +47,7 @@
 typedef int (FWScript::*opFunc)();
 
 struct Opcode {
-	opFunc proc;
+	const opFunc proc;
 	const char *args;
 };
 
@@ -148,7 +148,7 @@
 	FWScriptInfo *_info; ///< Script info
 
 protected:
-	static Opcode *_opcodeTable;
+	static const Opcode *_opcodeTable;
 	static unsigned int _numOpcodes;
 
 	int o1_modifyObjectParam();
@@ -300,7 +300,7 @@
  */
 class OSScript : public FWScript {
 private:
-	static Opcode *_opcodeTable;
+	static const Opcode *_opcodeTable;
 	static unsigned int _numOpcodes;
 
 protected:

Modified: scummvm/trunk/engines/cine/script_fw.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_fw.cpp	2009-02-15 20:15:24 UTC (rev 38286)
+++ scummvm/trunk/engines/cine/script_fw.cpp	2009-02-15 20:19:06 UTC (rev 38287)
@@ -49,7 +49,7 @@
 uint16 compareVars(int16 a, int16 b);
 
 
-Opcode *FWScript::_opcodeTable = 0;
+const Opcode *FWScript::_opcodeTable = 0;
 unsigned int FWScript::_numOpcodes = 0;
 
 void FWScript::setupTable() {
@@ -211,7 +211,7 @@
 		{ &FWScript::o1_unloadMask5, "b" }
 	};
 
-	FWScript::_opcodeTable = (Opcode *)opcodeTable;
+	FWScript::_opcodeTable = (const Opcode *)opcodeTable;
 	FWScript::_numOpcodes = ARRAYSIZE(opcodeTable);
 }
 

Modified: scummvm/trunk/engines/cine/script_os.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_os.cpp	2009-02-15 20:15:24 UTC (rev 38286)
+++ scummvm/trunk/engines/cine/script_os.cpp	2009-02-15 20:19:06 UTC (rev 38287)
@@ -38,7 +38,7 @@
 
 namespace Cine {
 
-Opcode *OSScript::_opcodeTable = 0;
+const Opcode *OSScript::_opcodeTable = 0;
 unsigned int OSScript::_numOpcodes = 0;
 
 void OSScript::setupTable() {
@@ -257,7 +257,7 @@
 		{ 0, 0 },
 		{ &FWScript::o1_changeDataDisk, "b" } /* Same as opcodes 0x6B and 0x95. */
 	};
-	OSScript::_opcodeTable = (Opcode *)opcodeTable;
+	OSScript::_opcodeTable = (const Opcode *)opcodeTable;
 	OSScript::_numOpcodes = ARRAYSIZE(opcodeTable);
 }
 


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