[Scummvm-cvs-logs] SF.net SVN: scummvm: [22839] scummvm/trunk/gui/theme-config.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Fri Jun 2 18:06:43 CEST 2006


Revision: 22839
Author:   sev
Date:     2006-06-02 09:06:17 -0700 (Fri, 02 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22839&view=rev

Log Message:
-----------
Optimize string usage a tiny bit more

Modified Paths:
--------------
    scummvm/trunk/gui/theme-config.cpp
Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp	2006-06-02 15:41:48 UTC (rev 22838)
+++ scummvm/trunk/gui/theme-config.cpp	2006-06-02 16:06:17 UTC (rev 22839)
@@ -412,19 +412,18 @@
 	int start = 0;
 	uint i;
 	int value;
+	const char *selfpostfixes[] = {"self.x", "self.y", "self.w", "self.h"};
 	const char *postfixes[] = {".x", ".y", ".w", ".h"};
 	int npostfix = 0;
 	const String prefixedname(prefix + name);
 
 	// Make self.BLAH work
 	for (i = 0; i < ARRAYSIZE(postfixes); i++) {
-		String from("self");
 		String to(prefixedname);
 
-		from += postfixes[i];
 		to += postfixes[i];
 
-		_evaluator->setAlias(from, to);
+		_evaluator->setAlias(selfpostfixes[i], to);
 		_evaluator->setVar(to, EVAL_UNDEF_VAR);
 	}
 


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