diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-12-16 18:57:19 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-12-16 18:57:19 +0000 |
| commit | ebecd60eb810246cfa682a1fbd72270aa9861f0b (patch) | |
| tree | 0c5c707b68cb08fc93ace2433291deb8a52db5bc /src/input_handler.cc | |
| parent | dbd7bd41bbf39d1fd5736997122a4652c78ddc50 (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/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index ea6da4b0..ae6ac83b 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -9,12 +9,11 @@ #include "normal.hh" #include "regex.hh" #include "register_manager.hh" +#include "unordered_map.hh" #include "user_interface.hh" #include "utf8.hh" #include "window.hh" -#include <unordered_map> - namespace Kakoune { @@ -736,10 +735,10 @@ private: bool m_autoshowcompl; Mode m_mode = Mode::Default; - static std::unordered_map<String, std::vector<String>> ms_history; + static UnorderedMap<String, std::vector<String>> ms_history; std::vector<String>::iterator m_history_it; }; -std::unordered_map<String, std::vector<String>> Prompt::ms_history; +UnorderedMap<String, std::vector<String>> Prompt::ms_history; class NextKey : public InputMode { |
