lib: fix clang compatibility / warnings

This commit is contained in:
Dirk-Jan C. Binnema
2022-02-18 10:49:56 +02:00
parent d2e6cfdf70
commit c0da564bba
16 changed files with 48 additions and 22 deletions

View File

@ -49,7 +49,7 @@ struct EmailHash {
{
std::size_t djb = 5381; // djb hash
for (const auto c : email)
djb = ((djb << 5) + djb) + g_ascii_tolower(c);
djb = ((djb << 5) + djb) + static_cast<size_t>(g_ascii_tolower(c));
return djb;
}
};
@ -66,7 +66,7 @@ struct ContactInfoHash {
{
std::size_t djb = 5381; // djb hash
for (const auto c : ci.email)
djb = ((djb << 5) + djb) + g_ascii_tolower(c);
djb = ((djb << 5) + djb) + static_cast<size_t>(g_ascii_tolower(c));
return djb;
}
};