aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2010-11-18 20:27:15 +0000
committerMax Horn2010-11-18 20:27:15 +0000
commit9fb1e2b17ea294b06297139198cd80c06783a714 (patch)
tree73ee6bee476d6b470caa53390d70591b6c55ee20 /backends
parent9531b7766ca99e1c6aac78474a4c73188dbad00f (diff)
downloadscummvm-rg350-9fb1e2b17ea294b06297139198cd80c06783a714.tar.gz
scummvm-rg350-9fb1e2b17ea294b06297139198cd80c06783a714.tar.bz2
scummvm-rg350-9fb1e2b17ea294b06297139198cd80c06783a714.zip
COMMON: Change wrapBufferedWriteStream() to always disposes wrapped stream
This is the only we need right now, and it saves a few bytes per instance. The template approach I used before has the drawback that it increases the binary size, which negates the benefit. Thanks to LordHoto for pointing this out. svn-id: r54344
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/ds/ds-fs.cpp4
-rw-r--r--backends/fs/psp/psp-fs.cpp2
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 0efee34369..272f34fd33 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -210,7 +210,7 @@ Common::SeekableReadStream *DSFileSystemNode::createReadStream() {
Common::WriteStream *DSFileSystemNode::createWriteStream() {
Common::WriteStream *stream = DSFileStream::makeFromPath(getPath(), true);
- return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE, DisposeAfterUse::YES);
+ return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
//////////////////////////////////////////////////////////////////////////
@@ -392,7 +392,7 @@ Common::SeekableReadStream *GBAMPFileSystemNode::createReadStream() {
Common::WriteStream *GBAMPFileSystemNode::createWriteStream() {
Common::WriteStream *stream = DSFileStream::makeFromPath(getPath(), true);
- return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE, DisposeAfterUse::YES);
+ return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index b512f528c9..aecf96363c 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -259,7 +259,7 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() {
Common::WriteStream *stream = PspIoStream::makeFromPath(getPath(), true);
- return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE, DisposeAfterUse::YES);
+ return Common::wrapBufferedWriteStream(stream, WRITE_BUFFER_SIZE);
}
#endif //#ifdef __PSP__
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index ea2e7e01de..ab7f3cff91 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -58,7 +58,7 @@ Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &f
Common::WriteStream *stream = DS::DSFileStream::makeFromPath(fileSpec, true);
// Use a write buffer
- stream = Common::wrapBufferedWriteStream(stream, SAVE_BUFFER_SIZE, DisposeAfterUse::YES);
+ stream = Common::wrapBufferedWriteStream(stream, SAVE_BUFFER_SIZE);
return stream;
}