Mercurial > audlegacy
changeset 1944:e3cd747562d6 trunk
[svn] - improve algorithm further
author | nenolod |
---|---|
date | Sun, 05 Nov 2006 13:49:20 -0800 |
parents | 488e5560c8b4 |
children | 89e1e4b392b4 |
files | ChangeLog audacious/mainwin.c |
diffstat | 2 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Nov 05 13:33:25 2006 -0800 +++ b/ChangeLog Sun Nov 05 13:49:20 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-05 21:33:25 +0000 William Pitcock <nenolod@nenolod.net> + revision [2843] + - use g_strcasecmp instead of several g_strdowns to speed up jump-to-file performance. closes #56 + + trunk/audacious/mainwin.c | 14 +------------- + 1 file changed, 1 insertion(+), 13 deletions(-) + + 2006-11-05 21:29:22 +0000 William Pitcock <nenolod@nenolod.net> revision [2841] - add keypad-enter binding for queueing files in jump-to-file. closes #295.
--- a/audacious/mainwin.c Sun Nov 05 13:33:25 2006 -0800 +++ b/audacious/mainwin.c Sun Nov 05 13:49:20 2006 -0800 @@ -1837,13 +1837,11 @@ { gint i = 0; - while (keys[i]) { - if (g_strcasecmp(song, keys[i])) - return FALSE; - i++; - } - - return TRUE; + for (i = 0; keys[i] != NULL; i++) + if (strstr(song, keys[i])) + return TRUE; + + return FALSE; } /* FIXME: Clear the entry when the list gets updated */