aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMatthew Hoops2010-05-11 19:13:24 +0000
committerMatthew Hoops2010-05-11 19:13:24 +0000
commit8b1cb63de3ca51fea0ee5fba96b32b39b5ab4fe5 (patch)
tree5f064e717b4ab38d898cc92ef2b05148180dbda4 /common
parentb05694b5299bd294f1f24577a2073d9ffeba924a (diff)
downloadscummvm-rg350-8b1cb63de3ca51fea0ee5fba96b32b39b5ab4fe5.tar.gz
scummvm-rg350-8b1cb63de3ca51fea0ee5fba96b32b39b5ab4fe5.tar.bz2
scummvm-rg350-8b1cb63de3ca51fea0ee5fba96b32b39b5ab4fe5.zip
Pass by reference instead of value to getResource(String)
svn-id: r49008
Diffstat (limited to 'common')
-rw-r--r--common/macresman.cpp2
-rw-r--r--common/macresman.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp
index fd17944fa9..b1b65b787d 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -381,7 +381,7 @@ Common::SeekableReadStream *MacResManager::getResource(uint32 typeID, uint16 res
return _stream->readStream(len);
}
-Common::SeekableReadStream *MacResManager::getResource(Common::String filename) {
+Common::SeekableReadStream *MacResManager::getResource(const Common::String &filename) {
for (uint32 i = 0; i < _resMap.numTypes; i++) {
for (uint32 j = 0; j < _resTypes[i].items; j++) {
if (_resLists[i][j].nameOffset != -1 && filename.equalsIgnoreCase(_resLists[i][j].name)) {
diff --git a/common/macresman.h b/common/macresman.h
index 5cd39cae26..f98bc81bf1 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -66,7 +66,7 @@ public:
* @param filename filename of the resource
* @return Pointer to a SeekableReadStream with loaded resource
*/
- Common::SeekableReadStream *getResource(Common::String filename);
+ Common::SeekableReadStream *getResource(const Common::String &filename);
Common::SeekableReadStream *getDataFork();
Common::String getResName(uint32 typeID, uint16 resID);