aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2008-09-29 10:49:36 +0000
committerMax Horn2008-09-29 10:49:36 +0000
commita177ebe156d90aab6a0b6ba3618b879c844bfc18 (patch)
tree002045e5fcad5958a6720ff36039adba6d450f3b /common
parenta4292055f7d5d058a71c69c53f62330f906fdda7 (diff)
downloadscummvm-rg350-a177ebe156d90aab6a0b6ba3618b879c844bfc18.tar.gz
scummvm-rg350-a177ebe156d90aab6a0b6ba3618b879c844bfc18.tar.bz2
scummvm-rg350-a177ebe156d90aab6a0b6ba3618b879c844bfc18.zip
Don't subclass ArjFile from Common::File (there seems to be no good reason for it). BTW, this code is an abomination and should be replaced by an Archive/SearchSet approach
svn-id: r34681
Diffstat (limited to 'common')
-rw-r--r--common/unarj.cpp6
-rw-r--r--common/unarj.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/common/unarj.cpp b/common/unarj.cpp
index 244a296efb..00f51ac252 100644
--- a/common/unarj.cpp
+++ b/common/unarj.cpp
@@ -324,15 +324,15 @@ uint32 ArjFile::read(void *dataPtr, uint32 dataSize) {
return _uncompressed->read(dataPtr, dataSize);
}
-bool ArjFile::eos() {
+bool ArjFile::eos() const {
return _uncompressed->eos();
}
-int32 ArjFile::pos() {
+int32 ArjFile::pos() const {
return _uncompressed->pos();
}
-int32 ArjFile::size() {
+int32 ArjFile::size() const {
return _uncompressed->size();
}
diff --git a/common/unarj.h b/common/unarj.h
index 52e0d13948..d16d748ad3 100644
--- a/common/unarj.h
+++ b/common/unarj.h
@@ -85,7 +85,7 @@ struct ArjHeader {
typedef HashMap<String, int, IgnoreCase_Hash, IgnoreCase_EqualTo> ArjFilesMap;
-class ArjFile : public File {
+class ArjFile : public SeekableReadStream, public NonCopyable {
public:
ArjFile();
~ArjFile();
@@ -98,9 +98,9 @@ public:
void close();
uint32 read(void *dataPtr, uint32 dataSize);
- bool eos();
- int32 pos();
- int32 size();
+ bool eos() const;
+ int32 pos() const;
+ int32 size() const;
bool seek(int32 offset, int whence = SEEK_SET);
bool isOpen() { return _isOpen; }