From a5a8833c059f28c85e392a3cd22c361d38ef95ff Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 6 Aug 2011 16:30:52 +0200 Subject: COMMON: Add DisposablePtr, which replaces many repeated implementations of a dispose flag. --- audio/decoders/adpcm_intern.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'audio/decoders/adpcm_intern.h') diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h index c9f894fb84..38514d7fca 100644 --- a/audio/decoders/adpcm_intern.h +++ b/audio/decoders/adpcm_intern.h @@ -33,6 +33,7 @@ #include "audio/audiostream.h" #include "common/endian.h" +#include "common/ptr.h" #include "common/stream.h" #include "common/textconsole.h" @@ -41,8 +42,7 @@ namespace Audio { class ADPCMStream : public RewindableAudioStream { protected: - Common::SeekableReadStream *_stream; - const DisposeAfterUse::Flag _disposeAfterUse; + Common::DisposablePtr _stream; const int32 _startpos; const int32 _endpos; const int _channels; @@ -62,7 +62,6 @@ protected: public: ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign); - ~ADPCMStream(); virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos); } virtual bool isStereo() const { return _channels == 2; } -- cgit v1.2.3