diff options
author | David Robillard <d@drobilla.net> | 2022-06-30 15:12:43 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-14 11:59:36 -0400 |
commit | 65099126804a1f872a079abe928d3afd2d6d6afe (patch) | |
tree | 9d978b7315f3558991968c452d7f82f83c61c3ec /src/collections.c | |
parent | b42fc2c9df979ff7c5ac738f6e299ac18a1d75c1 (diff) | |
download | lilv-65099126804a1f872a079abe928d3afd2d6d6afe.tar.gz lilv-65099126804a1f872a079abe928d3afd2d6d6afe.tar.bz2 lilv-65099126804a1f872a079abe928d3afd2d6d6afe.zip |
Fix MSVC build
Diffstat (limited to 'src/collections.c')
-rw-r--r-- | src/collections.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/collections.c b/src/collections.c index c2c752a..cec52b3 100644 --- a/src/collections.c +++ b/src/collections.c @@ -23,14 +23,13 @@ #include <stdbool.h> #include <stddef.h> -#include <stdint.h> int lilv_ptr_cmp(const void* a, const void* b, const void* user_data) { (void)user_data; - return (intptr_t)a - (intptr_t)b; + return a < b ? -1 : b < a ? 1 : 0; } int @@ -41,7 +40,7 @@ lilv_resource_node_cmp(const void* a, const void* b, const void* user_data) const SordNode* an = ((const LilvNode*)a)->node; const SordNode* bn = ((const LilvNode*)b)->node; - return (intptr_t)an - (intptr_t)bn; + return an < bn ? -1 : bn < an ? 1 : 0; } /* Generic collection functions */ |