Added new interface SeekableReadStream
svn-id: r16493
This commit is contained in:
parent
9c7a604c8b
commit
bc44b5ec15
6 changed files with 47 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue