From: Kefu Chai Date: Wed, 11 Aug 2021 04:02:57 +0000 (+0800) Subject: crush: build without "using namespace std" X-Git-Tag: v17.1.0~1121^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=573fd9804ced51fd825e745857c92b8f80ddcaa3;p=ceph.git crush: build without "using namespace std" * 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 --- diff --git a/src/crush/CrushCompiler.cc b/src/crush/CrushCompiler.cc index a936684f68eb..5e51aad8dba4 100644 --- a/src/crush/CrushCompiler.cc +++ b/src/crush/CrushCompiler.cc @@ -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; }