aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2008-09-29 11:01:25 +0000
committerMax Horn2008-09-29 11:01:25 +0000
commit18536552e0c13418036f0169cf150cb56f91b80e (patch)
tree324bc102a99b096dd8891c3874c4aab26eae716b /engines/scumm
parenta177ebe156d90aab6a0b6ba3618b879c844bfc18 (diff)
downloadscummvm-rg350-18536552e0c13418036f0169cf150cb56f91b80e.tar.gz
scummvm-rg350-18536552e0c13418036f0169cf150cb56f91b80e.tar.bz2
scummvm-rg350-18536552e0c13418036f0169cf150cb56f91b80e.zip
Added const qualifiers
svn-id: r34682
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/file.cpp6
-rw-r--r--engines/scumm/file.h18
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index f258ddd420..38c7a1a180 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -125,15 +125,15 @@ bool ScummFile::openSubFile(const Common::String &filename) {
}
-bool ScummFile::eos() {
+bool ScummFile::eos() const {
return _subFileLen ? (pos() >= _subFileLen) : File::eos(); // FIXME
}
-int32 ScummFile::pos() {
+int32 ScummFile::pos() const {
return File::pos() - _subFileStart;
}
-int32 ScummFile::size() {
+int32 ScummFile::size() const {
return _subFileLen ? _subFileLen : File::size();
}
diff --git a/engines/scumm/file.h b/engines/scumm/file.h
index 336f3cde12..e0ba7badff 100644
--- a/engines/scumm/file.h
+++ b/engines/scumm/file.h
@@ -39,9 +39,9 @@ public:
virtual bool open(const Common::String &filename) = 0;
virtual bool openSubFile(const Common::String &filename) = 0;
- virtual bool eos() = 0;
- virtual int32 pos() = 0;
- virtual int32 size() = 0;
+ virtual bool eos() const = 0;
+ virtual int32 pos() const = 0;
+ virtual int32 size() const = 0;
virtual bool seek(int32 offs, int whence = SEEK_SET) = 0;
virtual uint32 read(void *dataPtr, uint32 dataSize) = 0;
};
@@ -66,9 +66,9 @@ public:
bool ioFailed() const { return _myIoFailed || BaseScummFile::ioFailed(); }
void clearIOFailed() { _myIoFailed = false; BaseScummFile::clearIOFailed(); }
- bool eos();
- int32 pos();
- int32 size();
+ bool eos() const;
+ int32 pos() const;
+ int32 size() const;
bool seek(int32 offs, int whence = SEEK_SET);
uint32 read(void *dataPtr, uint32 dataSize);
};
@@ -111,9 +111,9 @@ public:
bool openSubFile(const Common::String &filename);
void close();
- bool eos() { return _stream->eos(); }
- int32 pos() { return _stream->pos(); }
- int32 size() { return _stream->size(); }
+ bool eos() const { return _stream->eos(); }
+ int32 pos() const { return _stream->pos(); }
+ int32 size() const { return _stream->size(); }
bool seek(int32 offs, int whence = SEEK_SET) { return _stream->seek(offs, whence); }
uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); }
};