diff options
author | David Robillard <d@drobilla.net> | 2024-11-13 11:33:54 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-13 11:49:59 -0500 |
commit | 613997e29aff202492ab368768c57857640b23b2 (patch) | |
tree | 02427ec3903d4c43fed4c36285e04cddf5a7a081 /src/sord.c | |
parent | e71b831791c2a8820fe0580adfc555d5dc4b3a1a (diff) | |
download | sord-613997e29aff202492ab368768c57857640b23b2.tar.gz sord-613997e29aff202492ab368768c57857640b23b2.tar.bz2 sord-613997e29aff202492ab368768c57857640b23b2.zip |
Avoid implicit signed/unsigned conversions
Diffstat (limited to 'src/sord.c')
-rw-r--r-- | src/sord.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -635,8 +635,8 @@ sord_best_index(SordModel* sord, { const bool graph_search = (pat[TUP_G] != 0); - const unsigned sig = (pat[0] ? 1 : 0) * 0x100 + (pat[1] ? 1 : 0) * 0x010 + - (pat[2] ? 1 : 0) * 0x001; + const unsigned sig = (pat[0] ? 1 : 0) * 0x100U + (pat[1] ? 1 : 0) * 0x010U + + (pat[2] ? 1 : 0) * 0x001U; SordOrder good[2] = {(SordOrder)-1, (SordOrder)-1}; @@ -717,7 +717,7 @@ sord_new(SordWorld* world, unsigned indices, bool graphs) const int* const ordering = orderings[i]; const int* const g_ordering = orderings[i + (NUM_ORDERS / 2)]; - if (indices & (1 << i)) { + if (indices & (1U << i)) { model->indices[i] = zix_btree_new(NULL, sord_quad_compare, (void*)ordering); if (graphs) { |