]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/messages/MMonCommand.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / messages / MMonCommand.h
index 4819eddbb8e1ca924ad9632c0bee32fcf3c7c772..29e4269e87820d2c3363fee5cee1e6d87f901f2b 100644 (file)
@@ -23,7 +23,7 @@
 using TOPNSPC::common::cmdmap_from_json;
 using TOPNSPC::common::cmd_getval;
 
-class MMonCommand : public PaxosServiceMessage {
+class MMonCommand final : public PaxosServiceMessage {
 public:
   // weird note: prior to octopus, MgrClient would leave fsid blank when
   // sending commands to the mgr.  Starting with octopus, this is either
@@ -39,24 +39,24 @@ public:
   { }
 
 private:
-  ~MMonCommand() override {}
+  ~MMonCommand() final {}
 
 public:
   std::string_view get_type_name() const override { return "mon_command"; }
   void print(std::ostream& o) const override {
     cmdmap_t cmdmap;
-    stringstream ss;
-    string prefix;
+    std::ostringstream ss;
+    std::string prefix;
     cmdmap_from_json(cmd, &cmdmap, ss);
     cmd_getval(cmdmap, "prefix", prefix);
     // Some config values contain sensitive data, so don't log them
     o << "mon_command(";
     if (prefix == "config set") {
-      string name;
+      std::string name;
       cmd_getval(cmdmap, "name", name);
       o << "[{prefix=" << prefix << ", name=" << name << "}]";
     } else if (prefix == "config-key set") {
-      string key;
+      std::string key;
       cmd_getval(cmdmap, "key", key);
       o << "[{prefix=" << prefix << ", key=" << key << "}]";
     } else {