From c1c40a4b56ef62a960a193cce2324cd966a6b4f7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 10 Apr 2017 21:33:20 +0100 Subject: Remove some now unneeded uses of const String& params HashMap supports finding String from StringView. --- src/command_manager.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index c0442255..0bf0bfdb 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -93,7 +93,7 @@ public: Optional command_info(const Context& context, StringView command_line) const; - bool command_defined(const String& command_name) const; + bool command_defined(StringView command_name) const; void register_command(String command_name, Command command, String docstring, @@ -127,7 +127,7 @@ private: int m_command_depth = 0; CommandMap::const_iterator find_command(const Context& context, - const String& name) const; + StringView name) const; }; String expand(StringView str, const Context& context, -- cgit v1.2.3