]> git.saurik.com Git - cydia.git/commitdiff
Add _unlikely() to conditions in -[Package unfiltered].
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 7 Dec 2010 10:18:46 +0000 (02:18 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 1 Jan 2011 22:32:06 +0000 (14:32 -0800)
MobileCydia.mm
UICaboodle/UCPlatform.h

index 2756250927cdf4b52c0d58c95056b17f2a8b4cc7..5f9e1d8228a50b938e487311042203ea0d155c42 100644 (file)
@@ -2478,12 +2478,12 @@ struct PackageNameOrdering :
 
 - (BOOL) unfiltered {
     _profile(Package$unfiltered$obsolete)
-        if (obsolete_)
+        if (_unlikely(obsolete_))
             return false;
     _end
 
     _profile(Package$unfiltered$hasSupportingRole)
-        if (![self hasSupportingRole])
+        if (_unlikely(![self hasSupportingRole]))
             return false;
     _end
 
index 4f2169e4c475b11f2f9b4f0b4efe465c3731ae28..c2412329e0376d16da0c1e652c4ee4c88414bbc7 100644 (file)
@@ -54,3 +54,9 @@ while (false)
     default: \
         _assume(false); \
         throw;
+
+#define _likely(expr) \
+    __builtin_expect(expr, 1)
+
+#define _unlikely(expr) \
+    __builtin_expect(expr, 0)