summaryrefslogtreecommitdiffhomepage
path: root/src/global-coords.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/global-coords.cpp')
-rw-r--r--src/global-coords.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/global-coords.cpp b/src/global-coords.cpp
index 4f3797f2..549a49ae 100644
--- a/src/global-coords.cpp
+++ b/src/global-coords.cpp
@@ -1,5 +1,6 @@
#include "global-coords.hpp"
#include "point.inl"
+#include "compat/hash.hpp"
#include <array>
#include <algorithm>
@@ -32,6 +33,12 @@ Debug& operator<<(Debug& dbg, const chunk_coords_& c)
return dbg;
}
+size_t global_coords::hash() const noexcept
+{
+ static_assert(sizeof *this == 4 + 4);
+ return hash_buf(this, sizeof *this);
+}
+
namespace {
static_assert(sizeof(decltype(local_coords::x))*8 == 8);