aboutsummaryrefslogtreecommitdiff
path: root/XY.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-24 18:32:55 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-24 18:32:55 +0200
commitfaa82f0a6004026c94a6415baf5e138b48dc1629 (patch)
treeead573bf9ec72a74569b79724c732c17dd9d0fb3 /XY.h
parentafc66d3013b7d47c6c22d6a99809bc3e7d1ff0dc (diff)
implement weird dijkstra
Diffstat (limited to 'XY.h')
-rw-r--r--XY.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/XY.h b/XY.h
index 839e19f..8809104 100644
--- a/XY.h
+++ b/XY.h
@@ -1,5 +1,7 @@
#pragma once
+#include <functional>
+
struct XY {
int x = 0;
int y = 0;
@@ -13,3 +15,7 @@ struct XY {
bool operator != (const XY& other) const;
};
+template<> struct std::hash<XY> {
+ size_t operator () (const XY &) const;
+};
+