Fix face completion, avoid a spurious temporary
This commit is contained in:
parent
0fc0702983
commit
6f65f4b3a5
|
@ -94,10 +94,9 @@ void FaceRegistry::register_alias(const String& name, const String& facedesc,
|
|||
CandidateList FaceRegistry::complete_alias_name(StringView prefix,
|
||||
ByteCount cursor_pos) const
|
||||
{
|
||||
using ValueType = std::pair<String, FaceOrAlias>;
|
||||
return complete(prefix, cursor_pos,
|
||||
transformed(m_aliases,
|
||||
[](const ValueType& v) -> const String&
|
||||
[](const AliasMap::value_type& v) -> const String&
|
||||
{ return v.first; }));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ private:
|
|||
FaceOrAlias(Face face = Face{}) : face(face) {}
|
||||
};
|
||||
|
||||
UnorderedMap<String, FaceOrAlias, MemoryDomain::Faces> m_aliases;
|
||||
using AliasMap = UnorderedMap<String, FaceOrAlias, MemoryDomain::Faces>;
|
||||
AliasMap m_aliases;
|
||||
};
|
||||
|
||||
inline Face get_face(const String& facedesc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user