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

Unified Diff: third_party/re2/re2/testing/regexp_test.cc

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated update instructions Created 5 years 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
Index: third_party/re2/re2/testing/regexp_test.cc
diff --git a/third_party/re2/re2/testing/regexp_test.cc b/third_party/re2/re2/testing/regexp_test.cc
index f317cbca89b4a9867a8bec15637332e8f1104728..31c76a3bf959a74d9397bc2e7edcd0a03f733c8d 100644
--- a/third_party/re2/re2/testing/regexp_test.cc
+++ b/third_party/re2/re2/testing/regexp_test.cc
@@ -29,10 +29,11 @@ TEST(Regexp, BigConcat) {
Regexp* x;
x = Regexp::Parse("x", Regexp::NoParseFlags, NULL);
vector<Regexp*> v(90000, x); // ToString bails out at 100000
- for (int i = 0; i < v.size(); i++)
+ for (size_t i = 0; i < v.size(); i++)
x->Incref();
- CHECK_EQ(x->Ref(), 1 + v.size()) << x->Ref();
- Regexp* re = Regexp::Concat(&v[0], v.size(), Regexp::NoParseFlags);
+ CHECK_EQ(x->Ref(), 1 + static_cast<int>(v.size())) << x->Ref();
+ Regexp* re = Regexp::Concat(v.data(), static_cast<int>(v.size()),
+ Regexp::NoParseFlags);
CHECK_EQ(re->ToString(), string(v.size(), 'x'));
re->Decref();
CHECK_EQ(x->Ref(), 1) << x->Ref();
« no previous file with comments | « third_party/re2/re2/testing/regexp_generator.cc ('k') | third_party/re2/re2/testing/required_prefix_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698