aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2010-11-18 17:15:35 +0000
committerMax Horn2010-11-18 17:15:35 +0000
commit24f4d97901f060607b13df596238ad982e573608 (patch)
tree5f4c8ebfa1a5c719925733f789f12357ce4be6f2 /backends
parent0001a6b74d77166dfa427ca0c9bf55e32119fce3 (diff)
downloadscummvm-rg350-24f4d97901f060607b13df596238ad982e573608.tar.gz
scummvm-rg350-24f4d97901f060607b13df596238ad982e573608.tar.bz2
scummvm-rg350-24f4d97901f060607b13df596238ad982e573608.zip
DS: Avoid needlessly allocating temporary Common::String instances
svn-id: r54329
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/ds/ds-fs.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index d977483852..f52bf6f501 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -201,11 +201,11 @@ AbstractFSNode *DSFileSystemNode::getParent() const {
}
Common::SeekableReadStream *DSFileSystemNode::createReadStream() {
- return DSFileStream::makeFromPath(getPath().c_str(), false);
+ return DSFileStream::makeFromPath(getPath(), false);
}
Common::WriteStream *DSFileSystemNode::createWriteStream() {
- return DSFileStream::makeFromPath(getPath().c_str(), true);
+ return DSFileStream::makeFromPath(getPath(), true);
}
//////////////////////////////////////////////////////////////////////////
@@ -381,12 +381,12 @@ Common::SeekableReadStream *GBAMPFileSystemNode::createReadStream() {
if (!strncmp(getPath().c_str(), "mp:/", 4)) {
return DSFileStream::makeFromPath(getPath().c_str() + 3, false);
} else {
- return DSFileStream::makeFromPath(getPath().c_str(), false);
+ return DSFileStream::makeFromPath(getPath(), false);
}
}
Common::WriteStream *GBAMPFileSystemNode::createWriteStream() {
- return DSFileStream::makeFromPath(getPath().c_str(), true);
+ return DSFileStream::makeFromPath(getPath(), true);
}
@@ -477,8 +477,6 @@ DSFileStream *DSFileStream::makeFromPath(const Common::String &path, bool writeM
}
-
-
// Stdio replacements
enum {
MAX_FILE_HANDLES = 32