diff --git a/src/highlighter.hh b/src/highlighter.hh index 7d7f5a1d..ae8ea0bd 100644 --- a/src/highlighter.hh +++ b/src/highlighter.hh @@ -67,7 +67,7 @@ std::unique_ptr> make_simple_highlighter(T func) using HighlighterParameters = memoryview; using HighlighterFactory = std::function; -struct HighlighterRegistry : id_map, +struct HighlighterRegistry : IdMap, Singleton {}; diff --git a/src/highlighter_group.hh b/src/highlighter_group.hh index 341d246a..5430d4ad 100644 --- a/src/highlighter_group.hh +++ b/src/highlighter_group.hh @@ -28,7 +28,7 @@ public: Completions complete_child(StringView path, ByteCount cursor_pos, bool group) const override; private: - using HighlighterMap = id_map>; + using HighlighterMap = IdMap>; HighlighterMap m_highlighters; }; diff --git a/src/highlighters.cc b/src/highlighters.cc index cb4eb7c3..dfc29297 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -958,7 +958,7 @@ public: return offset_pos(hl.complete_child(path.substr(offset), cursor_pos - offset, group), offset); } - auto container = transformed(m_groups, id_map::get_id); + auto container = transformed(m_groups, IdMap::get_id); return { 0, 0, complete(path, cursor_pos, container) }; } @@ -1005,7 +1005,7 @@ public: private: const NamedRegionDescList m_regions; const String m_default_group; - id_map m_groups; + IdMap m_groups; struct Region { diff --git a/src/hook_manager.cc b/src/hook_manager.cc index 2fe8bf5c..e460d696 100644 --- a/src/hook_manager.cc +++ b/src/hook_manager.cc @@ -27,7 +27,7 @@ CandidateList HookManager::complete_hook_group(StringView prefix, ByteCount pos_ CandidateList res; for (auto& list : m_hook) { - auto container = transformed(list.second, id_map::get_id); + auto container = transformed(list.second, IdMap::get_id); for (auto& c : complete(prefix, pos_in_token, container)) { if (!contains(res, c)) diff --git a/src/hook_manager.hh b/src/hook_manager.hh index 7a8b9ab7..7348654a 100644 --- a/src/hook_manager.hh +++ b/src/hook_manager.hh @@ -29,7 +29,7 @@ private: friend class Scope; HookManager* m_parent; - UnorderedMap> m_hook; + UnorderedMap> m_hook; }; } diff --git a/src/id_map.hh b/src/id_map.hh index 38624a80..591ec629 100644 --- a/src/id_map.hh +++ b/src/id_map.hh @@ -10,7 +10,7 @@ namespace Kakoune { template -class id_map +class IdMap { public: using value_type = std::pair; @@ -18,8 +18,8 @@ public: using iterator = typename container_type::iterator; using const_iterator = typename container_type::const_iterator; - id_map() = default; - id_map(std::initializer_list val) : m_content{val} {} + IdMap() = default; + IdMap(std::initializer_list val) : m_content{val} {} void append(const value_type& value) { diff --git a/src/parameters_parser.hh b/src/parameters_parser.hh index 0082ada9..86ed7311 100644 --- a/src/parameters_parser.hh +++ b/src/parameters_parser.hh @@ -40,7 +40,7 @@ struct SwitchDesc String description; }; -using SwitchMap = id_map; +using SwitchMap = IdMap; String generate_switches_doc(const SwitchMap& opts); diff --git a/src/register_manager.cc b/src/register_manager.cc index fb4baf81..31255805 100644 --- a/src/register_manager.cc +++ b/src/register_manager.cc @@ -61,7 +61,7 @@ Register& RegisterManager::operator[](StringView reg) if (reg.length() == 1) return (*this)[reg[0]]; - static const id_map reg_names = { + static const IdMap reg_names = { { "slash", '/' }, { "dquote", '"' }, { "pipe", '|' }