Tweak id_map implementation
This commit is contained in:
parent
79de7ee717
commit
c17fa7be14
|
@ -51,6 +51,8 @@ struct FilteredIterator : std::iterator<std::forward_iterator_tag,
|
|||
return not (lhs == rhs);
|
||||
}
|
||||
|
||||
Iterator base() const { return m_it; }
|
||||
|
||||
private:
|
||||
void do_filter()
|
||||
{
|
||||
|
@ -105,6 +107,8 @@ struct TransformedIterator : std::iterator<std::forward_iterator_tag,
|
|||
return not (lhs == rhs);
|
||||
}
|
||||
|
||||
Iterator base() const { return m_it; }
|
||||
|
||||
private:
|
||||
Iterator m_it;
|
||||
Transform m_transform;
|
||||
|
|
|
@ -33,14 +33,12 @@ public:
|
|||
|
||||
iterator find(StringView id)
|
||||
{
|
||||
return find_if(m_content,
|
||||
[&](const value_type& v){ return v.first == id; });
|
||||
return Kakoune::find(transformed(m_content, get_id), id).base();
|
||||
}
|
||||
|
||||
const_iterator find(StringView id) const
|
||||
{
|
||||
return find_if(m_content,
|
||||
[&](const value_type& v){ return v.first == id; });
|
||||
return Kakoune::find(transformed(m_content, get_id), id).base();
|
||||
}
|
||||
|
||||
bool contains(StringView id) const
|
||||
|
|
Loading…
Reference in New Issue
Block a user