1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

fix: GCC warning [-Werror=sign-conversion] (#176)

This commit is contained in:
Abdessattar Sassi 2022-03-31 17:48:27 +04:00 committed by GitHub
parent 2615fa5e7b
commit 5e6637ecde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -730,7 +730,7 @@ struct constexpr_hash_t<Value, std::enable_if_t<std::is_same_v<Value, string_vie
constexpr std::uint32_t operator()(string_view val) const noexcept {
auto crc = static_cast<std::uint32_t>(0xffffffffL);
for (const auto c : val) {
crc = (crc >> 8) ^ crc_table[(crc ^ c) & 0xff];
crc = (crc >> 8) ^ crc_table[(crc ^ static_cast<std::uint32_t>(c)) & 0xff];
}
return crc ^ 0xffffffffL;
}