]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: build without "using namespace std"
authorKefu Chai <kchai@redhat.com>
Wed, 11 Aug 2021 04:02:57 +0000 (12:02 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 13 Aug 2021 04:23:38 +0000 (12:23 +0800)
* add "std::" prefix in headers
* add "using" declarations in .cc files.

so we don't rely on "using namespace std" in one or more included
headers.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crush/CrushCompiler.cc

index a936684f68eb95d111caea105adba12c5a93b54a..5e51aad8dba492cd61060547760ea7d76f87e1dc 100644 (file)
@@ -793,7 +793,7 @@ int CrushCompiler::parse_rule(iter_t const& i)
   for (unsigned p = start + 3; p < i->children.size()-1; ++p) {
     string tag = string_node(i->children[p]);
     if (tag == "min_size" || tag == "max_size") {
-      cerr << "WARNING: " << tag << " is no longer supported, ignoring" << std::endl;
+      std::cerr << "WARNING: " << tag << " is no longer supported, ignoring" << std::endl;
       ++p;
       continue;
     }