ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.09k stars 77 forks source link

Fix make_unsigned trait in avr_type_helpers.h #74

Closed aharrison24 closed 3 years ago

aharrison24 commented 3 years ago

@adbancroft

The make_unsigned trait used by the AVR tests doesn't appear to do the right thing. I think there are some typos. As implemented, it seems to behave as you'd expect from a make_signed trait. Specifically, signed integral types are left unchanged by the trait, and for the unsigned types where there are specialisations, the trait actually adds signedness.

This PR ought to fix the issue, I think.