diff --git a/src/editor.hh b/src/editor.hh index 0847e0c4..1a99ceed 100644 --- a/src/editor.hh +++ b/src/editor.hh @@ -4,7 +4,6 @@ #include "buffer.hh" #include "dynamic_selection_list.hh" #include "filter.hh" -#include "idvaluemap.hh" #include "memoryview.hh" namespace Kakoune diff --git a/src/idvaluemap.hh b/src/idvaluemap.hh index b2cebb1d..c21b9af4 100644 --- a/src/idvaluemap.hh +++ b/src/idvaluemap.hh @@ -7,11 +7,11 @@ namespace Kakoune { -template +template class idvaluemap { public: - typedef std::pair<_Id, _Value> value_type; + typedef std::pair value_type; typedef std::vector container_type; typedef typename container_type::iterator iterator; typedef typename container_type::const_iterator const_iterator; @@ -23,10 +23,10 @@ public: void append(value_type&& value) { - m_content.push_back(std::forward(value)); + m_content.push_back(std::move(value)); } - iterator find(const _Id& id) + iterator find(const Id& id) { for (auto it = begin(); it != end(); ++it) { @@ -36,7 +36,7 @@ public: return end(); } - const_iterator find(const _Id& id) const + const_iterator find(const Id& id) const { for (auto it = begin(); it != end(); ++it) { @@ -46,12 +46,12 @@ public: return end(); } - bool contains(const _Id& id) const + bool contains(const Id& id) const { return find(id) != end(); } - void remove(const _Id& id) + void remove(const Id& id) { for (auto it = m_content.begin(); it != m_content.end(); ++it) { @@ -63,10 +63,10 @@ public: } } - template + template CandidateList complete_id_if(const String& prefix, ByteCount cursor_pos, - _Condition condition) const + Condition condition) const { String real_prefix = prefix.substr(0, cursor_pos); CandidateList result;