diff options
author | Max Horn | 2007-02-19 21:11:13 +0000 |
---|---|---|
committer | Max Horn | 2007-02-19 21:11:13 +0000 |
commit | 7290d1b18c82511b2e3b9339100e882c3e1fc8b5 (patch) | |
tree | 6b2c2ed2ef387077617aa2608fb1750b25ea6cd4 /common/stream.cpp | |
parent | 60e0f7624af149529b30d5d1b96364cd4b6db12a (diff) | |
download | scummvm-rg350-7290d1b18c82511b2e3b9339100e882c3e1fc8b5.tar.gz scummvm-rg350-7290d1b18c82511b2e3b9339100e882c3e1fc8b5.tar.bz2 scummvm-rg350-7290d1b18c82511b2e3b9339100e882c3e1fc8b5.zip |
Enhance (Seekable)SubReadStream so be able to (optionally) dispose the parent stream after it's been used (simplifies memory management for client code)
svn-id: r25732
Diffstat (limited to 'common/stream.cpp')
-rw-r--r-- | common/stream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/stream.cpp b/common/stream.cpp index afc21ebca2..3926fc30f6 100644 --- a/common/stream.cpp +++ b/common/stream.cpp @@ -128,8 +128,8 @@ uint32 SubReadStream::read(void *dataPtr, uint32 dataSize) { return dataSize; } -SeekableSubReadStream::SeekableSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end) - : SubReadStream(parentStream, end), +SeekableSubReadStream::SeekableSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end, bool disposeParentStream) + : SubReadStream(parentStream, end, disposeParentStream), _parentStream(parentStream), _begin(begin) { assert(_begin <= _end); |