From db5394ea002de879ad2c1251127a547fe7d6aeac Mon Sep 17 00:00:00 2001 From: abau Date: Sun, 10 Jun 2018 15:43:57 +0200 Subject: [PATCH] Add hash function for ToolKey ... to support older compilers. --- lib/src/tool/key.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/src/tool/key.hpp b/lib/src/tool/key.hpp index 0264e3c2..a7c57872 100644 --- a/lib/src/tool/key.hpp +++ b/lib/src/tool/key.hpp @@ -5,6 +5,8 @@ #ifndef DILAY_TOOL_KEY #define DILAY_TOOL_KEY +#include + enum class ToolKey { TransformMesh, @@ -26,4 +28,12 @@ enum class ToolKey MoveCamera }; +namespace std +{ + template <> struct hash + { + size_t operator() (const ToolKey& key) const { return std::hash () (int(key)); } + }; +} + #endif