From 6757ddc6cbc0b585549099d1a1850ec836bcebb0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 6 Mar 2017 19:44:36 +0000 Subject: [PATCH] Simplify AliasRegistry::remove_alias --- src/alias_registry.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/alias_registry.cc b/src/alias_registry.cc index b567d29f3..11d83ff01 100644 --- a/src/alias_registry.cc +++ b/src/alias_registry.cc @@ -19,9 +19,7 @@ void AliasRegistry::add_alias(String alias, String command) void AliasRegistry::remove_alias(StringView alias) { - auto it = m_aliases.find(alias); - if (it != m_aliases.end()) - m_aliases.erase(it); + m_aliases.remove(alias); } StringView AliasRegistry::operator[](StringView alias) const