]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/rgw: build without "using namespace std"
authorKefu Chai <kchai@redhat.com>
Wed, 11 Aug 2021 03:44:27 +0000 (11:44 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 13 Aug 2021 04:21:39 +0000 (12:21 +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/test/rgw/test_http_manager.cc
src/test/rgw/test_rgw_bencode.cc
src/test/rgw/test_rgw_lua.cc
src/test/rgw/test_rgw_period_history.cc

index 3ecd01d9f18393533f690913456e0b39bf99a21e..599266731d8a82ab4b843144a35401808bd949f3 100644 (file)
@@ -21,6 +21,8 @@
 #include <thread>
 #include <gtest/gtest.h>
 
+using namespace std;
+
 TEST(HTTPManager, ReadTruncated)
 {
   using tcp = boost::asio::ip::tcp;
index 66fa92a8a1796197d395ddace874ebb796f702a0..a6ba793944bbfb174d35aa941ca30980fdd95761 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "rgw/rgw_torrent.h"
 
+using namespace std;
+
 TEST(Bencode, String)
 {
   TorrentBencode decode;
index d8cc355c6303d32816d831343626c273bb9f9af7..f9459e1146e12f4e2ae417e30983373843f289ba 100644 (file)
@@ -6,6 +6,7 @@
 #include "rgw/rgw_sal_rados.h"
 #include "rgw/rgw_lua_request.h"
 
+using namespace std;
 using namespace rgw;
 using boost::container::flat_set;
 using rgw::auth::Identity;
index a4854ea778f1410cbb884ce34484d360fed30d7e..39c173ac430784fd50bb8f1ebbf162d928099d30 100644 (file)
@@ -19,6 +19,7 @@
 #include <boost/lexical_cast.hpp>
 #include <gtest/gtest.h>
 
+using namespace std;
 namespace {
 
 // construct a period with the given fields