summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-11-30 13:12:27 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-11-30 13:12:27 +0000
commit5ad4080b980785bf09bca1b75c07219af792fa9e (patch)
tree6159a162395f6b27dde63cd23cce0a69af954463 /apps/gui/skin_engine/skin_parser.c
parentc2c76284641d57498d0fb45139573aa445bc160d (diff)
downloadrockbox-5ad4080b980785bf09bca1b75c07219af792fa9e.tar.gz
rockbox-5ad4080b980785bf09bca1b75c07219af792fa9e.tar.bz2
rockbox-5ad4080b980785bf09bca1b75c07219af792fa9e.zip
Very small code shuffle to maybe make parseing %if() a smidgen faster
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28714 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 818edfbd07..4da13842e4 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -526,18 +526,18 @@ static int parse_logical_if(struct skin_element *element,
token->value.data = lif;
lif->token = element->params[0].data.code->data;
- if (!strcmp(op, "="))
+ if (!strncmp(op, "=", 1))
lif->op = IF_EQUALS;
- if (!strcmp(op, "!="))
+ else if (!strncmp(op, "!=", 2))
lif->op = IF_NOTEQUALS;
- if (!strcmp(op, "<"))
- lif->op = IF_LESSTHAN;
- if (!strcmp(op, "<="))
+ else if (!strncmp(op, ">=", 2))
+ lif->op = IF_GREATERTHAN_EQ;
+ else if (!strncmp(op, "<=", 2))
lif->op = IF_LESSTHAN_EQ;
- if (!strcmp(op, ">"))
+ else if (!strncmp(op, ">", 2))
lif->op = IF_GREATERTHAN;
- if (!strcmp(op, ">="))
- lif->op = IF_GREATERTHAN_EQ;
+ else if (!strncmp(op, "<", 1))
+ lif->op = IF_LESSTHAN;
memcpy(&lif->operand, &element->params[2], sizeof(lif->operand));
if (element->params_count > 3)