ALL: Specify the DisposeAfterUse constructor argument for dynamic memory write streams
This commit is contained in:
parent
1b3cc08b75
commit
3eb82462e7
5 changed files with 5 additions and 5 deletions
|
@ -344,7 +344,7 @@ bool QuickTimeAudioDecoder::QuickTimeAudioTrack::isOldDemuxing() const {
|
|||
|
||||
AudioStream *QuickTimeAudioDecoder::QuickTimeAudioTrack::readAudioChunk(uint chunk) {
|
||||
AudioSampleDesc *entry = (AudioSampleDesc *)_parentTrack->sampleDescs[0];
|
||||
Common::MemoryWriteStreamDynamic *wStream = new Common::MemoryWriteStreamDynamic();
|
||||
Common::MemoryWriteStreamDynamic *wStream = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::NO);
|
||||
|
||||
_decoder->_fd->seek(_parentTrack->chunkOffsets[chunk]);
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ void MidiParser_QT::initCommon() {
|
|||
byte *MidiParser_QT::readWholeTrack(Common::QuickTimeParser::Track *track, uint32 &trackSize) {
|
||||
// This just goes through all chunks and appends them together
|
||||
|
||||
Common::MemoryWriteStreamDynamic output;
|
||||
Common::MemoryWriteStreamDynamic output(DisposeAfterUse::NO);
|
||||
uint32 curSample = 0;
|
||||
|
||||
// Read in the note request data first
|
||||
|
|
|
@ -169,7 +169,7 @@ static uint32 convertSND2MIDI(byte *snddata, byte **data) {
|
|||
int n;
|
||||
double ll;
|
||||
|
||||
Common::MemoryWriteStreamDynamic st;
|
||||
Common::MemoryWriteStreamDynamic st(DisposeAfterUse::NO);
|
||||
|
||||
ll = log10(pow(2.0, 1.0 / 12.0));
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ void AIArea::saveAIState() {
|
|||
|
||||
delete vm->_aiSaveStream;
|
||||
|
||||
Common::MemoryWriteStreamDynamic out;
|
||||
Common::MemoryWriteStreamDynamic out(DisposeAfterUse::NO);
|
||||
writeAIRules(&out);
|
||||
|
||||
vm->_aiSaveStream = new Common::MemoryReadStream(out.getData(), out.size(), DisposeAfterUse::YES);
|
||||
|
|
|
@ -228,7 +228,7 @@ void ScummEngine_v4::prepareSavegame() {
|
|||
_savePreparedSavegame = NULL;
|
||||
|
||||
// store headerless savegame in a compressed memory stream
|
||||
memStream = new Common::MemoryWriteStreamDynamic();
|
||||
memStream = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::NO);
|
||||
writeStream = Common::wrapCompressedWriteStream(memStream);
|
||||
if (saveState(writeStream, false)) {
|
||||
// we have to finalize the compression-stream first, otherwise the internal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue