gnome-games r8465 - trunk/libgames-support
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8465 - trunk/libgames-support
- Date: Tue, 6 Jan 2009 18:19:29 +0000 (UTC)
Author: chpe
Date: Tue Jan 6 18:19:28 2009
New Revision: 8465
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8465&view=rev
Log:
Simplify this.
Modified:
trunk/libgames-support/games-card-theme.c
Modified: trunk/libgames-support/games-card-theme.c
==============================================================================
--- trunk/libgames-support/games-card-theme.c (original)
+++ trunk/libgames-support/games-card-theme.c Tue Jan 6 18:19:28 2009
@@ -737,7 +737,9 @@
{
g_return_val_if_fail (a != NULL && b != NULL, FALSE);
- return _games_card_theme_info_collate (a, b) == 0;
+ return a->type == b->type &&
+ strcmp (a->path, b->path) == 0 &&
+ strcmp (a->filename, b->filename) == 0;
}
/**
@@ -761,23 +763,7 @@
if (a->type != b->type)
return a->type - b->type;
- val = g_utf8_collate (a->display_name, b->display_name);
- if (val != 0)
- return val;
-
- val = strcmp (a->display_name, b->display_name);
- if (val != 0)
- return val;
-
- val = strcmp (a->path, b->path);
- if (val != 0)
- return val;
-
- val = strcmp (a->filename, b->filename);
- if (val != 0)
- return val;
-
- return 0;
+ return g_utf8_collate (a->display_name, b->display_name);
}
/* public API */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]