aboutsummaryrefslogtreecommitdiff
path: root/common/stream.cpp
diff options
context:
space:
mode:
authorMax Horn2008-09-13 16:51:46 +0000
committerMax Horn2008-09-13 16:51:46 +0000
commit655ce26b3f09628d9408a4d82efe3a26116999fe (patch)
tree779a25dbe25c8f916fb385b3dd2d48e0e379d9ec /common/stream.cpp
parentb86a047164b54c20366fcbe21b55bf63f2ced5f4 (diff)
downloadscummvm-rg350-655ce26b3f09628d9408a4d82efe3a26116999fe.tar.gz
scummvm-rg350-655ce26b3f09628d9408a4d82efe3a26116999fe.tar.bz2
scummvm-rg350-655ce26b3f09628d9408a4d82efe3a26116999fe.zip
Big patch changing the signature of various Stream methods (some ports may need to be slightly tweaked to fix overloading errors/warnings)
svn-id: r34514
Diffstat (limited to 'common/stream.cpp')
-rw-r--r--common/stream.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/stream.cpp b/common/stream.cpp
index d866fe0b5a..1ddaa17575 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -60,7 +60,7 @@ uint32 MemoryReadStream::read(void *dataPtr, uint32 dataSize) {
return dataSize;
}
-void MemoryReadStream::seek(int32 offs, int whence) {
+bool MemoryReadStream::seek(int32 offs, int whence) {
// Pre-Condition
assert(_pos <= _size);
switch (whence) {
@@ -81,6 +81,8 @@ void MemoryReadStream::seek(int32 offs, int whence) {
}
// Post-Condition
assert(_pos <= _size);
+
+ return true; // FIXME: STREAM REWRITE
}
#define LF 0x0A
@@ -241,7 +243,7 @@ SeekableSubReadStream::SeekableSubReadStream(SeekableReadStream *parentStream, u
_parentStream->seek(_pos);
}
-void SeekableSubReadStream::seek(int32 offset, int whence) {
+bool SeekableSubReadStream::seek(int32 offset, int whence) {
assert(_pos >= _begin);
assert(_pos <= _end);
@@ -259,7 +261,7 @@ void SeekableSubReadStream::seek(int32 offset, int whence) {
assert(_pos >= _begin);
assert(_pos <= _end);
- _parentStream->seek(_pos);
+ return _parentStream->seek(_pos);
}
BufferedReadStream::BufferedReadStream(ReadStream *parentStream, uint32 bufSize, bool disposeParentStream)
@@ -324,7 +326,7 @@ BufferedSeekableReadStream::BufferedSeekableReadStream(SeekableReadStream *paren
_parentStream(parentStream) {
}
-void BufferedSeekableReadStream::seek(int32 offset, int whence) {
+bool BufferedSeekableReadStream::seek(int32 offset, int whence) {
// If it is a "local" seek, we may get away with "seeking" around
// in the buffer only.
// Note: We could try to handle SEEK_END and SEEK_SET, too, but
@@ -339,6 +341,8 @@ void BufferedSeekableReadStream::seek(int32 offset, int whence) {
_pos = _bufSize;
_parentStream->seek(offset, whence);
}
+
+ return true; // FIXME: STREAM REWRITE
}
} // End of namespace Common