From e0c452adb6147c45fe89019ae135cdb9fdc3ea0a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 17 Dec 2014 13:20:48 +0000 Subject: [PATCH] Tweak keymap_manager style, fix missing move --- src/keymap_manager.cc | 4 ++-- src/keymap_manager.hh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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;