[folks] Fix Presence.is_online()



commit 47d0a18f953dc2bb5e8f7c21faab796c5a820d36
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Jul 21 12:08:35 2010 +0100

    Fix Presence.is_online()
    
    Due to a signed/unsigned int problem, typecmp() was never returning
    negative answers, so everyone was always online.

 folks/presence.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/folks/presence.vala b/folks/presence.vala
index 3de820f..9e2230a 100644
--- a/folks/presence.vala
+++ b/folks/presence.vala
@@ -108,9 +108,10 @@ public interface Folks.Presence : Object
    *
    * @return a number representing the similarity of the two types
    */
-  public static uint typecmp (PresenceType type_a, PresenceType type_b)
+  public static int typecmp (PresenceType type_a, PresenceType type_b)
     {
-      return type_availability (type_a) - type_availability (type_b);
+      return (int) type_availability (type_a) -
+          (int) type_availability (type_b);
     }
 
   /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]