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

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

Issue 1530113002: Revert of Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/re2/re2/stringpiece.cc ('k') | third_party/re2/re2/testing/compile_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/testing/backtrack.cc
diff --git a/third_party/re2/re2/testing/backtrack.cc b/third_party/re2/re2/testing/backtrack.cc
index a87284017b5f9d720fae25a3bd7454b07140336f..b2dd6dbad4bb4b35c78e2ef4f4065fa292cb84eb 100644
--- a/third_party/re2/re2/testing/backtrack.cc
+++ b/third_party/re2/re2/testing/backtrack.cc
@@ -72,7 +72,7 @@
// Search state
const char* cap_[64]; // capture registers
uint32 *visited_; // bitmap: (Inst*, char*) pairs already backtracked
- size_t nvisited_; // # of words in bitmap
+ int nvisited_; // # of words in bitmap
};
Backtracker::Backtracker(Prog* prog)
@@ -150,7 +150,7 @@
// either it didn't match or it did but we're hoping for a better match.
// Either way, don't go down that road again.
CHECK(p <= text_.end());
- size_t n = id*(text_.size()+1) + (p - text_.begin());
+ int n = id*(text_.size()+1) + (p - text_.begin());
CHECK_LT(n/32, nvisited_);
if (visited_[n/32] & (1 << (n&31)))
return false;
@@ -212,8 +212,7 @@
if (submatch_[0].data() == NULL || // First match so far ...
(longest_ && p > submatch_[0].end())) { // ... or better match
for (int i = 0; i < nsubmatch_; i++)
- submatch_[i].set(cap_[2*i],
- static_cast<int>(cap_[2*i+1] - cap_[2*i]));
+ submatch_[i] = StringPiece(cap_[2*i], cap_[2*i+1] - cap_[2*i]);
}
return true;
« no previous file with comments | « third_party/re2/re2/stringpiece.cc ('k') | third_party/re2/re2/testing/compile_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698