[Scummvm-cvs-logs] SF.net SVN: scummvm:[49008] scummvm/trunk/common

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Tue May 11 21:13:24 CEST 2010


Revision: 49008
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49008&view=rev
Author:   mthreepwood
Date:     2010-05-11 19:13:24 +0000 (Tue, 11 May 2010)

Log Message:
-----------
Pass by reference instead of value to getResource(String)

Modified Paths:
--------------
    scummvm/trunk/common/macresman.cpp
    scummvm/trunk/common/macresman.h

Modified: scummvm/trunk/common/macresman.cpp
===================================================================
--- scummvm/trunk/common/macresman.cpp	2010-05-11 16:16:49 UTC (rev 49007)
+++ scummvm/trunk/common/macresman.cpp	2010-05-11 19:13:24 UTC (rev 49008)
@@ -381,7 +381,7 @@
 	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)) {

Modified: scummvm/trunk/common/macresman.h
===================================================================
--- scummvm/trunk/common/macresman.h	2010-05-11 16:16:49 UTC (rev 49007)
+++ scummvm/trunk/common/macresman.h	2010-05-11 19:13:24 UTC (rev 49008)
@@ -66,7 +66,7 @@
 	 * @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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list