From 7c76ac1735a3b8f4523856bbd67588b6ccc7f850 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 25 Apr 2017 17:01:28 -0700 Subject: Remove "using namespace std" from stubs/common.h This prevents the contents of the std namespace from being effectively pulled into the top-level namespace in all translation units that include common.h. I left in individual using statements for a few common things like std::set and std::map, because it did not seem worth going through the churn of updating the whole codebase to fix those right now. --- src/google/protobuf/stubs/int128_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/google/protobuf/stubs/int128_unittest.cc') diff --git a/src/google/protobuf/stubs/int128_unittest.cc b/src/google/protobuf/stubs/int128_unittest.cc index 5d33292c..1ec899ad 100644 --- a/src/google/protobuf/stubs/int128_unittest.cc +++ b/src/google/protobuf/stubs/int128_unittest.cc @@ -370,29 +370,29 @@ TEST(Int128, DivideAndMod) { EXPECT_EQ(r, result_r); // Try the other way around. - swap(q, b); + std::swap(q, b); result_q = a / b; result_r = a % b; EXPECT_EQ(q, result_q); EXPECT_EQ(r, result_r); // Restore. - swap(b, q); + std::swap(b, q); // Dividend < divisor; result should be q:0 r:. - swap(a, b); + std::swap(a, b); result_q = a / b; result_r = a % b; EXPECT_EQ(0, result_q); EXPECT_EQ(a, result_r); // Try the other way around. - swap(a, q); + std::swap(a, q); result_q = a / b; result_r = a % b; EXPECT_EQ(0, result_q); EXPECT_EQ(a, result_r); // Restore. - swap(q, a); - swap(b, a); + std::swap(q, a); + std::swap(b, a); // Try a large remainder. b = a / 2 + 1; @@ -501,7 +501,7 @@ TEST(Int128, OStream) { {uint128(12345), std::ios::dec | std::ios::left, 6, '_', "12345_"}, }; for (size_t i = 0; i < GOOGLE_ARRAYSIZE(cases); ++i) { - ostringstream os; + std::ostringstream os; os.flags(cases[i].flags); os.width(cases[i].width); os.fill(cases[i].fill); -- cgit v1.2.3