diff options
author | Adam Cozzette <acozzette@google.com> | 2017-04-25 17:01:28 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-04-26 08:25:01 -0700 |
commit | 7c76ac1735a3b8f4523856bbd67588b6ccc7f850 (patch) | |
tree | b5198d8b815cfc08fdede21cd4a0969837b92930 /src/google/protobuf/stubs/int128_unittest.cc | |
parent | 4920e27a488976c9993cef686d868a846868eb56 (diff) |
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.
Diffstat (limited to 'src/google/protobuf/stubs/int128_unittest.cc')
-rw-r--r-- | src/google/protobuf/stubs/int128_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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:<dividend>. - 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); |