From 1c721a67988dd579af0739c13f854792577f3f9f Mon Sep 17 00:00:00 2001 From: Changcheng Liu Date: Wed, 12 Aug 2020 09:17:56 +0800 Subject: [PATCH] mon: use string_view for string content and define val where it's used Signed-off-by: Changcheng Liu --- src/mon/Monitor.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 0e47ffea0fb..3ca46e9bc02 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3268,7 +3268,6 @@ void Monitor::handle_command(MonOpRequestRef op) return; } - string module; string err; dout(0) << "handle_command " << *m << dendl; @@ -3287,7 +3286,7 @@ void Monitor::handle_command(MonOpRequestRef op) return; } - module = fullcmd[0]; + std::string_view module = fullcmd[0]; // validate command is in leader map -- 2.39.5