Chromium Code Reviews

Unified Diff: third_party/re2/re2/stringpiece.h

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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « third_party/re2/re2/simplify.cc ('k') | third_party/re2/re2/stringpiece.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/stringpiece.h
diff --git a/third_party/re2/re2/stringpiece.h b/third_party/re2/re2/stringpiece.h
index 1479d1ac6137d13396507fa2c9bd768b2a79af96..38a515097be43078bc21af8f40a1bf0e8eb3d41c 100644
--- a/third_party/re2/re2/stringpiece.h
+++ b/third_party/re2/re2/stringpiece.h
@@ -20,10 +20,12 @@
#define STRINGS_STRINGPIECE_H__
#include <string.h>
-#include <algorithm>
#include <cstddef>
#include <iosfwd>
#include <string>
+#ifdef WIN32
+#include <algorithm>
+#endif
namespace re2 {
@@ -137,17 +139,15 @@
int max_size() const { return length_; }
int capacity() const { return length_; }
- size_type copy(char* buf, size_type n, size_type pos = 0) const;
+ int copy(char* buf, size_type n, size_type pos = 0) const;
- bool contains(StringPiece s) const;
-
- size_type find(const StringPiece& s, size_type pos = 0) const;
- size_type find(char c, size_type pos = 0) const;
- size_type rfind(const StringPiece& s, size_type pos = npos) const;
- size_type rfind(char c, size_type pos = npos) const;
+ int find(const StringPiece& s, size_type pos = 0) const;
+ int find(char c, size_type pos = 0) const;
+ int rfind(const StringPiece& s, size_type pos = npos) const;
+ int rfind(char c, size_type pos = npos) const;
StringPiece substr(size_type pos, size_type n = npos) const;
-
+
static bool _equal(const StringPiece&, const StringPiece&);
};
« no previous file with comments | « third_party/re2/re2/simplify.cc ('k') | third_party/re2/re2/stringpiece.cc » ('j') | no next file with comments »

Powered by Google App Engine