aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2017-09-20 19:01:51 +0200
committerBastien Bouclet2017-09-22 07:06:21 +0200
commit3eb82462e772832a902ba336b680e2a961339ee1 (patch)
treec0499005e4f806cfe7ba2d21d9d633e01bbf65dc /engines
parent1b3cc08b75c56a06cfa90edaf1b0da181d40ddcc (diff)
downloadscummvm-rg350-3eb82462e772832a902ba336b680e2a961339ee1.tar.gz
scummvm-rg350-3eb82462e772832a902ba336b680e2a961339ee1.tar.bz2
scummvm-rg350-3eb82462e772832a902ba336b680e2a961339ee1.zip
ALL: Specify the DisposeAfterUse constructor argument for dynamic memory write streams
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/sound_midi.cpp2
-rw-r--r--engines/pegasus/ai/ai_area.cpp2
-rw-r--r--engines/scumm/saveload.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index 6998df6862..97dcc0d98b 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -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));
diff --git a/engines/pegasus/ai/ai_area.cpp b/engines/pegasus/ai/ai_area.cpp
index c078d5e80e..58698e6c77 100644
--- a/engines/pegasus/ai/ai_area.cpp
+++ b/engines/pegasus/ai/ai_area.cpp
@@ -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);
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 0ab36d1a96..06d564648b 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -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