Skip to content

Commit

Permalink
avoid warning for -cf when T is unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianpls committed Jul 6, 2024
1 parent 0556373 commit 3a53066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QB3lib/QB3decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static bool decode(uint8_t *src, size_t len, T* image, const decs &info)
abits = 0;
}
s.advance(B2 + abits);
T v = mags(T(-cf));
T v = T(((cf - 1) << 1) | 1); // mags(-cf)
for (int i = 0; i < B2; i++)
group[i] = ((acc >> i) & 1) ? v : 0;
runbits[c] = topbit(v);
Expand Down

0 comments on commit 3a53066

Please sign in to comment.