Cleanup: avoid function call for pointer compare
authorCampbell Barton <ideasman42@gmail.com>
Sat, 5 Jan 2019 08:55:25 +0000 (19:55 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 5 Jan 2019 08:56:15 +0000 (19:56 +1100)
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenlib/intern/BLI_ghash_utils.c

index 1fe51b9..26453ff 100644 (file)
@@ -2054,8 +2054,8 @@ static bool nlaevalchan_keycmp(const void *a, const void *b)
        const NlaEvalChannelKey *A = a;
        const NlaEvalChannelKey *B = b;
 
-       return (BLI_ghashutil_ptrcmp(A->ptr.data, B->ptr.data) ||
-               BLI_ghashutil_ptrcmp(A->prop, B->prop));
+       return ((A->ptr.data != B->ptr.data) ||
+               (A->prop != B->prop));
 }
 
 /* ---------------------- */
index a0d9fef..053f177 100644 (file)
@@ -203,8 +203,8 @@ bool BLI_ghashutil_paircmp(const void *a, const void *b)
        const GHashPair *A = a;
        const GHashPair *B = b;
 
-       return (BLI_ghashutil_ptrcmp(A->first, B->first) ||
-               BLI_ghashutil_ptrcmp(A->second, B->second));
+       return ((A->first != B->first) ||
+               (A->second != B->second));
 }
 
 void BLI_ghashutil_pairfree(void *ptr)