changeset 3313:257c0d0c5806 trunk

use g_str_has_prefix() more.
author William Pitcock <nenolod@atheme-project.org>
date Fri, 10 Aug 2007 10:51:39 -0500
parents dfbbad8d7953
children 328221f7a580
files src/audacious/tuple_formatter.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple_formatter.c	Fri Aug 10 10:47:03 2007 -0500
+++ b/src/audacious/tuple_formatter.c	Fri Aug 10 10:51:39 2007 -0500
@@ -77,7 +77,7 @@
         /* if it's raw text, just copy the byte */
         if (*iter != '$' && *iter != '%')
             g_string_append_c(ctx->str, *iter);
-        else if (*iter == '$' && *(iter + 1) == '{')
+        else if (g_str_has_prefix(iter, "${") == TRUE)
         {
             GString *expression = g_string_new("");
             GString *argument = g_string_new("");
@@ -133,7 +133,7 @@
             if (*iter == '\0')
                 break;
         }
-        else if (*iter == '%' && *(iter + 1) == '{')
+        else if (g_str_has_prefix(iter, "%{") == TRUE)
         {
             GString *expression = g_string_new("");
             GString *argument = g_string_new("");