Added new interface SeekableReadStream

svn-id: r16493
This commit is contained in:
Max Horn 2005-01-09 01:41:43 +00:00
parent 9c7a604c8b
commit bc44b5ec15
6 changed files with 47 additions and 21 deletions

View file

@ -25,9 +25,9 @@
namespace Common {
void MemoryReadStream::seek(uint32 offs, int whence) {
void MemoryReadStream::seek(int32 offs, int whence) {
// Pre-Condition
assert(_pos <= _bufSize);
assert(0 <= _pos && _pos <= _bufSize);
switch (whence) {
case SEEK_END:
// SEEK_END works just like SEEK_SET, only 'reversed',
@ -45,7 +45,7 @@ void MemoryReadStream::seek(uint32 offs, int whence) {
break;
}
// Post-Condition
assert(_pos <= _bufSize);
assert(0 <= _pos && _pos <= _bufSize);
}