aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2009-06-23 01:19:37 +0000
committerSven Hesse2009-06-23 01:19:37 +0000
commit4fa11436a0f97be92bcb0a8bfcfc6fd55840013c (patch)
treeded49e79004442fe83341a38358c0679cd52a7e7 /engines
parent8bd5c0cebad9733cdb1d1969f9d0ce1991635b81 (diff)
downloadscummvm-rg350-4fa11436a0f97be92bcb0a8bfcfc6fd55840013c.tar.gz
scummvm-rg350-4fa11436a0f97be92bcb0a8bfcfc6fd55840013c.tar.bz2
scummvm-rg350-4fa11436a0f97be92bcb0a8bfcfc6fd55840013c.zip
Const correctness
svn-id: r41790
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/script.cpp8
-rw-r--r--engines/gob/script.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp
index 4549fd8698..c0c4a09943 100644
--- a/engines/gob/script.cpp
+++ b/engines/gob/script.cpp
@@ -119,7 +119,7 @@ bool Script::skip(int32 offset) {
return seek(offset, SEEK_CUR);
}
-int32 Script::getOffset(byte *ptr) {
+int32 Script::getOffset(byte *ptr) const {
if (!_totData)
return -1;
@@ -129,7 +129,7 @@ int32 Script::getOffset(byte *ptr) {
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 @@ bool Script::evalBoolResult() {
return false;
}
-int32 Script::getResultInt() {
+int32 Script::getResultInt() const {
return _expression->getResultInt();
}
-char *Script::getResultStr() {
+char *Script::getResultStr() const {
return _expression->getResultStr();
}
diff --git a/engines/gob/script.h b/engines/gob/script.h
index 8ea553e92e..c5ed6c3e25 100644
--- a/engines/gob/script.h
+++ b/engines/gob/script.h
@@ -85,13 +85,13 @@ public:
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();