[Scummvm-cvs-logs] SF.net SVN: scummvm:[34681] scummvm/trunk/common
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Sep 29 12:49:39 CEST 2008
Revision: 34681
http://scummvm.svn.sourceforge.net/scummvm/?rev=34681&view=rev
Author: fingolfin
Date: 2008-09-29 10:49:36 +0000 (Mon, 29 Sep 2008)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/trunk/common/unarj.cpp
scummvm/trunk/common/unarj.h
Modified: scummvm/trunk/common/unarj.cpp
===================================================================
--- scummvm/trunk/common/unarj.cpp 2008-09-29 10:32:06 UTC (rev 34680)
+++ scummvm/trunk/common/unarj.cpp 2008-09-29 10:49:36 UTC (rev 34681)
@@ -324,15 +324,15 @@
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();
}
Modified: scummvm/trunk/common/unarj.h
===================================================================
--- scummvm/trunk/common/unarj.h 2008-09-29 10:32:06 UTC (rev 34680)
+++ scummvm/trunk/common/unarj.h 2008-09-29 10:49:36 UTC (rev 34681)
@@ -85,7 +85,7 @@
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 @@
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; }
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