summaryrefslogtreecommitdiff
path: root/src/keymap_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-12-16 18:57:19 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-12-16 18:57:19 +0000
commitebecd60eb810246cfa682a1fbd72270aa9861f0b (patch)
tree0c5c707b68cb08fc93ace2433291deb8a52db5bc /src/keymap_manager.hh
parentdbd7bd41bbf39d1fd5736997122a4652c78ddc50 (diff)
Rework hashing, use a more extensible framework similar to n3876 proposal
std::hash specialization is a pain to work with, stop using that, and just specialize a 'size_t hash_value(const T&)' free function.
Diffstat (limited to 'src/keymap_manager.hh')
-rw-r--r--src/keymap_manager.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/keymap_manager.hh b/src/keymap_manager.hh
index 5743a18e..b7f7019b 100644
--- a/src/keymap_manager.hh
+++ b/src/keymap_manager.hh
@@ -2,9 +2,9 @@
#define keymap_manager_hh_INCLUDED
#include "keys.hh"
-#include "utils.hh"
+#include "hash.hh"
+#include "unordered_map.hh"
-#include <unordered_map>
#include <vector>
namespace Kakoune
@@ -43,7 +43,8 @@ private:
KeymapManager* m_parent;
using KeyList = std::vector<Key>;
- using Keymap = std::unordered_map<std::pair<Key, KeymapMode>, KeyList>;
+ using KeyAndMode = std::pair<Key, KeymapMode>;
+ using Keymap = UnorderedMap<KeyAndMode, KeyList>;
Keymap m_mapping;
};