[Scummvm-cvs-logs] SF.net SVN: scummvm: [22930] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Jun 5 14:35:44 CEST 2006


Revision: 22930
Author:   fingolfin
Date:     2006-06-05 05:35:33 -0700 (Mon, 05 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22930&view=rev

Log Message:
-----------
cleanup

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeNew.cpp
    scummvm/trunk/gui/eval.cpp
    scummvm/trunk/gui/eval.h
    scummvm/trunk/gui/theme-config.cpp
    scummvm/trunk/gui/widget.cpp
Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp	2006-06-05 12:29:21 UTC (rev 22929)
+++ scummvm/trunk/gui/ThemeNew.cpp	2006-06-05 12:35:33 UTC (rev 22930)
@@ -22,7 +22,6 @@
 #ifndef DISABLE_FANCY_THEMES
 
 #include "gui/theme.h"
-#include "gui/eval.h"
 
 #include "graphics/imageman.h"
 #include "graphics/imagedec.h"

Modified: scummvm/trunk/gui/eval.cpp
===================================================================
--- scummvm/trunk/gui/eval.cpp	2006-06-05 12:29:21 UTC (rev 22929)
+++ scummvm/trunk/gui/eval.cpp	2006-06-05 12:35:33 UTC (rev 22930)
@@ -30,6 +30,21 @@
 
 namespace GUI {
 
+enum TokenTypes {
+	tDelimiter,
+	tVariable,
+	tNumber,
+	tString
+};
+
+enum EvalErrors {
+	eSyntaxError,
+	eExtraBracket,
+	eUnclosedBracket,
+	eBadExpr,
+	eUndefVar
+};
+
 static bool isdelim(char c) {
 	if (strchr(" ;,+-<>/*%^=()", c) || c == 9 || c == '\n' || !c)
 		return true;
@@ -302,10 +317,6 @@
 	return EVAL_UNDEF_VAR;
 }
 
-void Eval::setAlias(const String &section, const char *name, const String &value) {
-	_aliases[name + 4] = value;
-}
-
 void Eval::setVar(const String &section, const char *name, const String &value) {
 	_vars[name + 4] = eval(value, section, name, 0);
 }

Modified: scummvm/trunk/gui/eval.h
===================================================================
--- scummvm/trunk/gui/eval.h	2006-06-05 12:29:21 UTC (rev 22929)
+++ scummvm/trunk/gui/eval.h	2006-06-05 12:35:33 UTC (rev 22930)
@@ -32,30 +32,16 @@
 using Common::String;
 using Common::HashMap;
 
-#define EVAL_UNDEF_VAR -13375
-
-enum tokenTypes {
-	tDelimiter,
-	tVariable,
-	tNumber,
-	tString
+enum {
+	EVAL_UNDEF_VAR = -13375
 };
 
-enum evalErrors {
-	eSyntaxError,
-	eExtraBracket,
-	eUnclosedBracket,
-	eBadExpr,
-	eUndefVar
-};
-
 class Eval {
 public:
 	Eval();
 	~Eval();
 
 	int eval(const String &input, const String &section, const String &name, int startpos);
-	void setAlias(const String &section, const char *name, const String &value);
 	void setVar(const String &section, const char *name, const String &value);
 
 	void setParent(const String &name);

Modified: scummvm/trunk/gui/theme-config.cpp
===================================================================
--- scummvm/trunk/gui/theme-config.cpp	2006-06-05 12:29:21 UTC (rev 22929)
+++ scummvm/trunk/gui/theme-config.cpp	2006-06-05 12:35:33 UTC (rev 22930)
@@ -482,7 +482,7 @@
 			continue;
 		}
 		if (iterk->key.hasPrefix("set_")) {
-			_evaluator->setAlias(name, iterk->key.c_str(), prefix + iterk->value);
+			_evaluator->setAlias(iterk->key.c_str() + 4, prefix + iterk->value);
 			continue;
 		}
 		if (iterk->key.hasPrefix("def_")) {

Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp	2006-06-05 12:29:21 UTC (rev 22929)
+++ scummvm/trunk/gui/widget.cpp	2006-06-05 12:35:33 UTC (rev 22930)
@@ -156,7 +156,7 @@
 
 	_align = (Graphics::TextAlignment)g_gui.evaluator()->getVar(name + ".align");
 
-	if (_align == EVAL_UNDEF_VAR)
+	if (_align == (int)EVAL_UNDEF_VAR)
 		_align = kTextAlignLeft;
 }
 


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