[libgames-support] scores: Use category keys for category comparison functions



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]