Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Unified Diff: base/string_piece_unittest.cc

Issue 9167008: Resolve an ambiguous function call by casting to StringPiece::size_type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_piece_unittest.cc
diff --git a/base/string_piece_unittest.cc b/base/string_piece_unittest.cc
index a29fe747e6db2ff3c7d3fe61def7c03402c45335..72453b52a161aee5a768fd4ae3c677a2fd1c7e74 100644
--- a/base/string_piece_unittest.cc
+++ b/base/string_piece_unittest.cc
@@ -664,9 +664,11 @@ TYPED_TEST(CommonStringPieceTest, CheckConstructors) {
ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str.c_str()));
ASSERT_TRUE(TestFixture::as_string("hello") ==
BasicStringPiece<TypeParam>(str.c_str(), 5));
- ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.c_str(), 0));
+ ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.c_str(),
+ static_cast<StringPiece::size_type>(0)));
Evan Martin 2012/01/10 16:15:59 Can you indent this to match the opening paren lik
ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL));
- ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL, 0));
+ ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL,
+ static_cast<StringPiece::size_type>(0)));
ASSERT_TRUE(empty == BasicStringPiece<TypeParam>());
ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str.begin(), str.end()));
ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.begin(), str.begin()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698