Fix compilation with GCC 9

This commit is contained in:
ISSOtm
2026-04-26 14:46:11 +02:00
committed by Rangi
parent 6bcd79b997
commit d5ce5329ea
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -50,14 +50,14 @@ char const *printChar(int c);
struct Uppercase {
// FNV-1a hash of an uppercased string
constexpr size_t operator()(std::string const &str) const {
size_t operator()(std::string const &str) const {
return std::accumulate(RANGE(str), size_t(0x811C9DC5), [](size_t hash, char c) {
return (hash ^ toUpper(c)) * 16777619;
});
}
// Compare two strings without case-sensitivity (by converting to uppercase)
constexpr bool operator()(std::string const &str1, std::string const &str2) const {
bool operator()(std::string const &str1, std::string const &str2) const {
return std::equal(RANGE(str1), RANGE(str2), [](char c1, char c2) {
return toUpper(c1) == toUpper(c2);
});