yomm2
yomm2 copied to clipboard
fix potential class/struct odr violations, and fix 32-bit shift
Two commits in this PR:
- Fix potential ODR violations from the same types declared as class or struct. While it's true that the Itanium ABI, does not distinguish between the two, other ABI-s might, and MSVC's does. In rare cases this may lead to crazy bugs.
- Fix a 32-bit shift:
1 << Mis a 32-bit shift. So, even thoughMandbucketswill be 64-bit (size_t) on a x64 system, whenMis 32 or more, UB will ensue.