diff --git a/src/keymap_manager.cc b/src/keymap_manager.cc index 74323a84..668af430 100644 --- a/src/keymap_manager.cc +++ b/src/keymap_manager.cc @@ -6,9 +6,9 @@ namespace Kakoune { -void KeymapManager::map_key(Key key, KeymapMode mode, std::vector mapping) +void KeymapManager::map_key(Key key, KeymapMode mode, KeyList mapping) { - m_mapping[{key, mode}] = mapping; + m_mapping[{key, mode}] = std::move(mapping); } void KeymapManager::unmap_key(Key key, KeymapMode mode) diff --git a/src/keymap_manager.hh b/src/keymap_manager.hh index b7f7019b..09ae48d1 100644 --- a/src/keymap_manager.hh +++ b/src/keymap_manager.hh @@ -29,7 +29,8 @@ class KeymapManager public: KeymapManager(KeymapManager& parent) : m_parent(&parent) {} - void map_key(Key key, KeymapMode mode, std::vector mapping); + using KeyList = std::vector; + void map_key(Key key, KeymapMode mode, KeyList mapping); void unmap_key(Key key, KeymapMode mode); bool is_mapped(Key key, KeymapMode mode) const; @@ -42,7 +43,6 @@ private: KeymapManager* m_parent; - using KeyList = std::vector; using KeyAndMode = std::pair; using Keymap = UnorderedMap; Keymap m_mapping;