diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-02-12 19:14:06 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-02-12 19:14:06 +0000 |
| commit | 6f65f4b3a534ea14c69d7febbf5dfb31e253c533 (patch) | |
| tree | d1cfbae0da2f0c15aabdbc7373a10ff59dd2c9ad /src | |
| parent | 0fc070298332ad979d6cfd9f8f79782f758df346 (diff) | |
Fix face completion, avoid a spurious temporary
Diffstat (limited to 'src')
| -rw-r--r-- | src/face_registry.cc | 3 | ||||
| -rw-r--r-- | src/face_registry.hh | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/face_registry.cc b/src/face_registry.cc index 53e93f78..3a5ac6e1 100644 --- a/src/face_registry.cc +++ b/src/face_registry.cc @@ -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; })); } diff --git a/src/face_registry.hh b/src/face_registry.hh index 67cb8b86..27879a85 100644 --- a/src/face_registry.hh +++ b/src/face_registry.hh @@ -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) |
