mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
DS: Avoid needlessly allocating temporary Common::String instances
svn-id: r54329
This commit is contained in:
parent
0001a6b74d
commit
24f4d97901
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user