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

Unified Diff: third_party/re2/re2/set.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
« no previous file with comments | « third_party/re2/re2/set.h ('k') | third_party/re2/re2/simplify.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/set.cc
diff --git a/third_party/re2/re2/set.cc b/third_party/re2/re2/set.cc
index 2bcd30acb486dc379b7dd3d04ca831402ceae3ed..a1a84ba5d315aabc8d353f114f6dc2efab17b766 100644
--- a/third_party/re2/re2/set.cc
+++ b/third_party/re2/re2/set.cc
@@ -20,7 +20,7 @@ RE2::Set::Set(const RE2::Options& options, RE2::Anchor anchor) {
}
RE2::Set::~Set() {
- for (int i = 0; i < re_.size(); i++)
+ for (size_t i = 0; i < re_.size(); i++)
re_[i]->Decref();
delete prog_;
}
@@ -45,7 +45,7 @@ int RE2::Set::Add(const StringPiece& pattern, string* error) {
}
// Concatenate with match index and push on vector.
- int n = re_.size();
+ int n = static_cast<int>(re_.size());
re2::Regexp* m = re2::Regexp::HaveMatch(n, pf);
if (re->op() == kRegexpConcat) {
int nsub = re->nsub();
@@ -75,8 +75,8 @@ bool RE2::Set::Compile() {
Regexp::ParseFlags pf = static_cast<Regexp::ParseFlags>(
options_.ParseFlags());
- re2::Regexp* re = re2::Regexp::Alternate(const_cast<re2::Regexp**>(&re_[0]),
- re_.size(), pf);
+ re2::Regexp* re = re2::Regexp::Alternate(const_cast<re2::Regexp**>(re_.data()),
+ static_cast<int>(re_.size()), pf);
re_.clear();
re2::Regexp* sre = re->Simplify();
re->Decref();
« no previous file with comments | « third_party/re2/re2/set.h ('k') | third_party/re2/re2/simplify.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698