Remove unused AliasRegistry::flatten_aliases method

We do not complete alias names anymore, so this method is not
needed.
This commit is contained in:
Maxime Coste 2017-03-04 19:45:41 +00:00
parent cc88b0f586
commit ed2d50ecef
2 changed files with 0 additions and 15 deletions

View File

@ -50,17 +50,4 @@ Vector<StringView> AliasRegistry::aliases_for(StringView command) const
return res; return res;
} }
Vector<std::pair<StringView, StringView>> AliasRegistry::flatten_aliases() const
{
Vector<std::pair<StringView, StringView>> res;
if (m_parent)
res = m_parent->flatten_aliases();
for (auto& alias : m_aliases)
{
if (not contains(res | transform(std::mem_fn(&AliasDesc::first)), alias.key))
res.emplace_back(alias.key, alias.value);
}
return res;
}
} }

View File

@ -20,8 +20,6 @@ public:
using iterator = AliasMap::const_iterator; using iterator = AliasMap::const_iterator;
Vector<StringView> aliases_for(StringView command) const; Vector<StringView> aliases_for(StringView command) const;
using AliasDesc = std::pair<StringView, StringView>;
Vector<AliasDesc> flatten_aliases() const;
private: private:
friend class Scope; friend class Scope;