Simplify AliasRegistry::remove_alias
This commit is contained in:
parent
58bde719e1
commit
6757ddc6cb
|
@ -19,9 +19,7 @@ void AliasRegistry::add_alias(String alias, String command)
|
||||||
|
|
||||||
void AliasRegistry::remove_alias(StringView alias)
|
void AliasRegistry::remove_alias(StringView alias)
|
||||||
{
|
{
|
||||||
auto it = m_aliases.find(alias);
|
m_aliases.remove(alias);
|
||||||
if (it != m_aliases.end())
|
|
||||||
m_aliases.erase(it);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StringView AliasRegistry::operator[](StringView alias) const
|
StringView AliasRegistry::operator[](StringView alias) const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user