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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Jun 23 03:19:38 CEST 2009


Revision: 41790
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41790&view=rev
Author:   drmccoy
Date:     2009-06-23 01:19:37 +0000 (Tue, 23 Jun 2009)

Log Message:
-----------
Const correctness

Modified Paths:
--------------
    scummvm/trunk/engines/gob/script.cpp
    scummvm/trunk/engines/gob/script.h

Modified: scummvm/trunk/engines/gob/script.cpp
===================================================================
--- scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:19:21 UTC (rev 41789)
+++ scummvm/trunk/engines/gob/script.cpp	2009-06-23 01:19:37 UTC (rev 41790)
@@ -119,7 +119,7 @@
 	return seek(offset, SEEK_CUR);
 }
 
-int32 Script::getOffset(byte *ptr) {
+int32 Script::getOffset(byte *ptr) const {
 	if (!_totData)
 		return -1;
 
@@ -129,7 +129,7 @@
 	return ptr - _totData;
 }
 
-byte *Script::getData(int32 offset) {
+byte *Script::getData(int32 offset) const {
 	if (!_totData)
 		return 0;
 	if ((offset < 0) || (((uint32) offset) >= _totSize))
@@ -303,11 +303,11 @@
 		return false;
 }
 
-int32 Script::getResultInt() {
+int32 Script::getResultInt() const {
 	return _expression->getResultInt();
 }
 
-char *Script::getResultStr() {
+char *Script::getResultStr() const {
 	return _expression->getResultStr();
 }
 

Modified: scummvm/trunk/engines/gob/script.h
===================================================================
--- scummvm/trunk/engines/gob/script.h	2009-06-23 01:19:21 UTC (rev 41789)
+++ scummvm/trunk/engines/gob/script.h	2009-06-23 01:19:37 UTC (rev 41790)
@@ -85,13 +85,13 @@
 	bool evalBoolResult();
 
 	// Accessing the result of expressions
-	int32 getResultInt();
-	char *getResultStr();
+	int32 getResultInt() const;
+	char *getResultStr() const;
 
 	/** Returns the offset the specified pointer is within the script data. */
-	int32 getOffset(byte *ptr);
+	int32 getOffset(byte *ptr) const;
 	/** Returns the data pointer to the offset. */
-	byte *getData(int32 offset);
+	byte *getData(int32 offset) const;
 
 	/** Returns the raw data pointer. */
 	byte *getData();


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