summaryrefslogtreecommitdiffhomepage
path: root/compat/int-hash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/int-hash.cpp')
-rw-r--r--compat/int-hash.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/compat/int-hash.cpp b/compat/int-hash.cpp
index 3c85a436..35422486 100644
--- a/compat/int-hash.cpp
+++ b/compat/int-hash.cpp
@@ -1,5 +1,6 @@
#include "compat/defs.hpp"
#include "int-hash.hpp"
+#include <Corrade/Containers/StringView.h>
#include <bit>
namespace floormat {
@@ -78,15 +79,9 @@ fm_UNROLL_8
return hash;
}
-size_t hash_int(uint32_t x) noexcept
-{
- return fnvhash_uint_32(x);
-}
-
-size_t hash_int(uint64_t x) noexcept
-{
- return fnvhash_uint_64(x);
-}
+size_t hash_int(uint32_t x) noexcept { return fnvhash_uint_32(x); }
+size_t hash_int(uint64_t x) noexcept { return fnvhash_uint_64(x); }
+size_t hash_string_view::operator()(StringView s) const noexcept { return Hash::fnvhash_buf(s.data(), s.size()); }
} // namespace floormat