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; |