[libgames-support] scores: Use category keys for category comparison functions
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgames-support] scores: Use category keys for category comparison functions
- Date: Sun, 14 Feb 2016 04:51:55 +0000 (UTC)
commit 3cd26b508201c2e6180618437cae26d210c8d00a
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sat Feb 13 22:51:17 2016 -0600
scores: Use category keys for category comparison functions
The keys are unique and not translated
games/scores/context.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/games/scores/context.vala b/games/scores/context.vala
index 4015532..8fffd6f 100644
--- a/games/scores/context.vala
+++ b/games/scores/context.vala
@@ -44,14 +44,14 @@ public class Context : Object
private string user_score_dir;
- /*Comparison and hash functions for Map and Priority Queue.*/
+ /* Comparison and hash functions for Map and Priority Queue.*/
private CompareDataFunc<Score?> scorecmp;
private static Gee.HashDataFunc<Category?> category_hash = (a) => {
- return str_hash (a.name);
+ return str_hash (a.key);
};
private static Gee.EqualDataFunc<Category?> category_equal = (a,b) => {
- return str_equal (a.name, b.name);
+ return str_equal (a.key, b.key);
};
/* A function provided by the game that converts the category key to a
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]