Index: third_party/re2/re2/compile.cc |
diff --git a/third_party/re2/re2/compile.cc b/third_party/re2/re2/compile.cc |
index 14e401afc55a547acf9d799702c33bde8fc25630..9a59f1354473edbbafe58ea7f437b921ff815383 100644 |
--- a/third_party/re2/re2/compile.cc |
+++ b/third_party/re2/re2/compile.cc |
@@ -110,10 +110,6 @@ struct Frag { |
Frag(uint32 begin, PatchList end) : begin(begin), end(end) {} |
}; |
-static Frag NullFrag() { |
- return Frag(); |
-} |
- |
// Input encodings. |
enum Encoding { |
kEncodingUTF8 = 1, // UTF-8 (0-10FFFF) |
@@ -685,13 +681,13 @@ Frag Compiler::PreVisit(Regexp* re, Frag, bool* stop) { |
if (failed_) |
*stop = true; |
- return NullFrag(); // not used by caller |
+ return Frag(); // not used by caller |
} |
Frag Compiler::Literal(Rune r, bool foldcase) { |
switch (encoding_) { |
default: |
- return NullFrag(); |
+ return Frag(); |
case kEncodingLatin1: |
return ByteRange(r, r, foldcase); |
@@ -1007,7 +1003,7 @@ Prog* Compiler::Compile(Regexp* re, bool reversed, int64 max_mem) { |
bool is_anchor_end = IsAnchorEnd(&sre, 0); |
// Generate fragment for entire regexp. |
- Frag f = c.WalkExponential(sre, NullFrag(), 2*c.max_inst_); |
+ Frag f = c.WalkExponential(sre, Frag(), 2*c.max_inst_); |
sre->Decref(); |
if (c.failed_) |
return NULL; |
@@ -1098,7 +1094,7 @@ Prog* Compiler::CompileSet(const RE2::Options& options, RE2::Anchor anchor, |
c.Setup(pf, options.max_mem(), anchor); |
// Compile alternation of fragments. |
- Frag all = c.WalkExponential(re, NullFrag(), 2*c.max_inst_); |
+ Frag all = c.WalkExponential(re, Frag(), 2*c.max_inst_); |
re->Decref(); |
if (c.failed_) |
return NULL; |