summaryrefslogtreecommitdiffhomepage
path: root/hash/hash.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'hash/hash.hpp')
-rw-r--r--hash/hash.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/hash/hash.hpp b/hash/hash.hpp
new file mode 100644
index 00000000..e3df6e90
--- /dev/null
+++ b/hash/hash.hpp
@@ -0,0 +1,14 @@
+#pragma once
+#include "hash-impl.hpp"
+#include <cr/StringView.h>
+
+namespace floormat {
+namespace Hash = xxHash;
+
+using Hash::hash_buf;
+using Hash::hash_int;
+
+struct hash_string_view { [[nodiscard]] CORRADE_ALWAYS_INLINE size_t operator()(StringView str) const noexcept; };
+size_t hash_string_view::operator()(StringView str) const noexcept { return hash_buf(str.data(), str.size()); }
+
+} // namespace floormat