1
0
mirror of synced 2024-11-15 03:27:40 +01:00

patterns: Fixed local variable truncation

This commit is contained in:
WerWolv 2022-01-12 11:59:08 +01:00
parent 63edfb8d52
commit a7a57e2bd0

View File

@ -116,8 +116,8 @@ namespace hex {
}
[[nodiscard]]
constexpr uint64_t bitmask(uint8_t bits) {
return (uint64_t(1) << (bits)) - 1;
constexpr u128 bitmask(u8 bits) {
return u128(-1) >> (128 - bits);
}
template<typename T>