]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/kvstore_tool: add "std::" before ostream and string 42235/head
authorKefu Chai <kchai@redhat.com>
Thu, 8 Jul 2021 00:42:34 +0000 (08:42 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 8 Jul 2021 00:44:26 +0000 (08:44 +0800)
also use <iosfwd> instead of <iostream> for forward declaration of
std::ostream, so that we don't need to include the whole iostream
header file in kvstore_tool.h.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/kvstore_tool.h

index e2522124c77750a33ea25b2ee244cf3bef396304..330cba7c98dbd53ad9f3f931c57cd37531f5e53e 100644 (file)
@@ -3,8 +3,8 @@
 
 #pragma once
 
+#include <iosfwd>
 #include <memory>
-#include <ostream>
 #include <string>
 
 #include "acconfig.h"
@@ -49,7 +49,7 @@ public:
   uint32_t traverse(const std::string& prefix,
                     const bool do_crc,
                     const bool do_value_dump,
-                    ostream *out);
+                    std::ostream *out);
   void list(const std::string& prefix,
            const bool do_crc,
            const bool do_value_dump);
@@ -77,5 +77,5 @@ public:
   int destructive_repair();
 
   int print_stats() const;
-  int build_size_histogram(const string& prefix) const;
+  int build_size_histogram(const std::string& prefix) const;
 };