]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: use string_view for string content and define val where it's used
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 12 Aug 2020 01:17:56 +0000 (09:17 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 12 Aug 2020 01:25:19 +0000 (09:25 +0800)
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/mon/Monitor.cc

index 0e47ffea0fb87da318d1e7ed6c0f306ea5330fbd..3ca46e9bc02b439f40283fa0eaa4829e0a746547 100644 (file)
@@ -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