diff options
-rw-r--r-- | common/stream.cpp | 2 | ||||
-rw-r--r-- | common/substream.h | 8 | ||||
-rw-r--r-- | engines/gob/dataio.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/music.cpp | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/common/stream.cpp b/common/stream.cpp index 30b3bca497..85647bfe3a 100644 --- a/common/stream.cpp +++ b/common/stream.cpp @@ -240,7 +240,7 @@ bool SeekableSubReadStream::seek(int32 offset, int whence) { return ret; } -uint32 SafeSubReadStream::read(void *dataPtr, uint32 dataSize) { +uint32 SafeSeekableSubReadStream::read(void *dataPtr, uint32 dataSize) { // Make sure the parent stream is at the right position seek(0, SEEK_CUR); diff --git a/common/substream.h b/common/substream.h index 6475b7aa14..1ad588a43d 100644 --- a/common/substream.h +++ b/common/substream.h @@ -99,14 +99,14 @@ public: * normal SeekableSubReadStream, at the cost of seek()ing the parent stream * before each read(). * - * More than one SafeSubReadStream to the same parent stream can be used + * More than one SafeSeekableSubReadStream to the same parent stream can be used * at the same time; they won't mess up each other. They will, however, * reposition the parent stream, so don't depend on its position to be - * the same after a read() or seek() on one of its SafeSubReadStream. + * the same after a read() or seek() on one of its SafeSeekableSubReadStream. */ -class SafeSubReadStream : public SeekableSubReadStream { +class SafeSeekableSubReadStream : public SeekableSubReadStream { public: - SafeSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end, DisposeAfterUse::Flag disposeParentStream = DisposeAfterUse::NO) + SafeSeekableSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end, DisposeAfterUse::Flag disposeParentStream = DisposeAfterUse::NO) : SeekableSubReadStream(parentStream, begin, end, disposeParentStream) { } diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index 1633a1edb7..2071c0f1be 100644 --- a/engines/gob/dataio.cpp +++ b/engines/gob/dataio.cpp @@ -414,7 +414,7 @@ Common::SeekableReadStream *DataIO::getFile(File &file) { return 0; Common::SeekableReadStream *rawData = - new Common::SafeSubReadStream(&file.archive->file, file.offset, file.offset + file.size); + new Common::SafeSeekableSubReadStream(&file.archive->file, file.offset, file.offset + file.size); if (file.compression == 0) return rawData; diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index 40a4021a5c..62fb3d244d 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -160,19 +160,19 @@ static Audio::AudioStream *getAudioStream(SoundFileHandle *fh, const char *base, return makeCLUStream(&fh->file, enc_len); #ifdef USE_MAD case kMP3Mode: { - Common::SafeSubReadStream *tmp = new Common::SafeSubReadStream(&fh->file, pos, pos + enc_len); + Common::SafeSeekableSubReadStream *tmp = new Common::SafeSeekableSubReadStream(&fh->file, pos, pos + enc_len); return Audio::makeMP3Stream(tmp, DisposeAfterUse::YES); } #endif #ifdef USE_VORBIS case kVorbisMode: { - Common::SafeSubReadStream *tmp = new Common::SafeSubReadStream(&fh->file, pos, pos + enc_len); + Common::SafeSeekableSubReadStream *tmp = new Common::SafeSeekableSubReadStream(&fh->file, pos, pos + enc_len); return Audio::makeVorbisStream(tmp, DisposeAfterUse::YES); } #endif #ifdef USE_FLAC case kFLACMode: { - Common::SafeSubReadStream *tmp = new Common::SafeSubReadStream(&fh->file, pos, pos + enc_len); + Common::SafeSeekableSubReadStream *tmp = new Common::SafeSeekableSubReadStream(&fh->file, pos, pos + enc_len); return Audio::makeFLACStream(tmp, DisposeAfterUse::YES); } #endif |