diff options
author | Yotam Barnoy | 2010-09-14 14:00:15 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-09-14 14:00:15 +0000 |
commit | a1b16661de7d573c03aeb04d7be093020a3ff4b0 (patch) | |
tree | 6677af4dc6bcac08b129136fb8c3195089ba8a07 /backends/fs | |
parent | 2cd25f87cd6869e61d88374d61c8b1176a8e7b24 (diff) | |
download | scummvm-rg350-a1b16661de7d573c03aeb04d7be093020a3ff4b0.tar.gz scummvm-rg350-a1b16661de7d573c03aeb04d7be093020a3ff4b0.tar.bz2 scummvm-rg350-a1b16661de7d573c03aeb04d7be093020a3ff4b0.zip |
PSP: remove virtual inheritance of BufferedWriteStream and BufferedSeekableReadStream
As Max pointed out to me, one can't really use virtual functions called from constructors/destructors.
svn-id: r52722
Diffstat (limited to 'backends/fs')
-rw-r--r-- | backends/fs/psp/psp-fs.cpp | 4 | ||||
-rw-r--r-- | backends/fs/psp/psp-stream.h | 16 |
2 files changed, 2 insertions, 18 deletions
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp index 4857a385b7..521a32067e 100644 --- a/backends/fs/psp/psp-fs.cpp +++ b/backends/fs/psp/psp-fs.cpp @@ -251,7 +251,7 @@ Common::SeekableReadStream *PSPFilesystemNode::createReadStream() { Common::SeekableReadStream *stream = PspIoStream::makeFromPath(getPath(), false); - return new PspIoBufferedReadStream(stream, READ_BUFFER_SIZE, DisposeAfterUse::YES); + return new Common::BufferedSeekableReadStream(stream, READ_BUFFER_SIZE, DisposeAfterUse::YES); } Common::WriteStream *PSPFilesystemNode::createWriteStream() { @@ -259,7 +259,7 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() { Common::WriteStream *stream = PspIoStream::makeFromPath(getPath(), true); - return new PspIoBufferedWriteStream(stream, WRITE_BUFFER_SIZE, DisposeAfterUse::YES); + return new Common::BufferedWriteStream(stream, WRITE_BUFFER_SIZE, DisposeAfterUse::YES); } #endif //#ifdef __PSP__ diff --git a/backends/fs/psp/psp-stream.h b/backends/fs/psp/psp-stream.h index be3a1220de..16c53cbcad 100644 --- a/backends/fs/psp/psp-stream.h +++ b/backends/fs/psp/psp-stream.h @@ -33,22 +33,6 @@ #include "common/stream.h" #include "common/str.h" -class PspIoBufferedReadStream : public Common::BufferedSeekableReadStream { -public: - PspIoBufferedReadStream(SeekableReadStream *parentStream, uint32 bufSize, DisposeAfterUse::Flag disposeParentStream = DisposeAfterUse::YES) : BufferedSeekableReadStream(parentStream, bufSize, disposeParentStream) {} -protected: - virtual void allocBuf(uint32 bufSize) { _buf = (byte *)memalign(64, bufSize); } // want 64 byte alignment for cache - virtual void deallocBuf() { free(_buf); } -}; - -class PspIoBufferedWriteStream : public Common::BufferedWriteStream { -public: - PspIoBufferedWriteStream(WriteStream *parentStream, uint32 bufSize, DisposeAfterUse::Flag disposeParentStream = DisposeAfterUse::YES) : BufferedWriteStream(parentStream, bufSize, disposeParentStream) {} -protected: - virtual void allocBuf(uint32 bufSize) { _buf = (byte *)memalign(64, bufSize); } - virtual void deallocBuf() { free(_buf); } -}; - /** * Class to handle special suspend/resume needs of PSP IO Streams */ |