summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-12-23 22:51:00 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-12-23 22:51:00 +0000
commitb0fef1a962b0161080f6dae548ffbce33648fe91 (patch)
treeeb5140358fa4fcc78a03886613f4e8daa39784e5
parentfb611e2f6296e563850d74fea180ade749ab404b (diff)
Rename id_map to IdMap
-rw-r--r--src/highlighter.hh2
-rw-r--r--src/highlighter_group.hh2
-rw-r--r--src/highlighters.cc4
-rw-r--r--src/hook_manager.cc2
-rw-r--r--src/hook_manager.hh2
-rw-r--r--src/id_map.hh6
-rw-r--r--src/parameters_parser.hh2
-rw-r--r--src/register_manager.cc2
8 files changed, 11 insertions, 11 deletions
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<SimpleHighlighter<T>> make_simple_highlighter(T func)
using HighlighterParameters = memoryview<String>;
using HighlighterFactory = std::function<HighlighterAndId (HighlighterParameters params)>;
-struct HighlighterRegistry : id_map<HighlighterFactory>,
+struct HighlighterRegistry : IdMap<HighlighterFactory>,
Singleton<HighlighterRegistry>
{};
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<std::unique_ptr<Highlighter>>;
+ using HighlighterMap = IdMap<std::unique_ptr<Highlighter>>;
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<HighlighterGroup>::get_id);
+ auto container = transformed(m_groups, IdMap<HighlighterGroup>::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<HighlighterGroup> m_groups;
+ IdMap<HighlighterGroup> 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<HookFunc>::get_id);
+ auto container = transformed(list.second, IdMap<HookFunc>::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<String, id_map<HookFunc>> m_hook;
+ UnorderedMap<String, IdMap<HookFunc>> 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<typename Value>
-class id_map
+class IdMap
{
public:
using value_type = std::pair<String, Value>;
@@ -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<value_type> val) : m_content{val} {}
+ IdMap() = default;
+ IdMap(std::initializer_list<value_type> 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<SwitchDesc>;
+using SwitchMap = IdMap<SwitchDesc>;
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<Codepoint> reg_names = {
+ static const IdMap<Codepoint> reg_names = {
{ "slash", '/' },
{ "dquote", '"' },
{ "pipe", '|' }