Pass by reference instead of value to getResource(String)

svn-id: r49008
This commit is contained in:
Matthew Hoops 2010-05-11 19:13:24 +00:00
parent b05694b529
commit 8b1cb63de3
2 changed files with 2 additions and 2 deletions

View File

@ -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)) {

View File

@ -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);