diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-24 17:52:14 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-24 17:52:14 +0300 |
commit | 154700b20366969d89b7f6b6ffcedf6be3a1deae (patch) | |
tree | 84c3ecf3cb6ca91983676fe6b79f0904d66a9462 /contrib/libs/re2 | |
parent | e593c74c608a3cd3ec6189c63ec44ed28616340e (diff) | |
download | ydb-154700b20366969d89b7f6b6ffcedf6be3a1deae.tar.gz |
intermediate changes
ref:70ac1bca1acbb458c863fb4686263967ea009057
Diffstat (limited to 'contrib/libs/re2')
-rw-r--r-- | contrib/libs/re2/re2/re2.cc | 2 | ||||
-rw-r--r-- | contrib/libs/re2/re2/re2.h | 14 | ||||
-rw-r--r-- | contrib/libs/re2/re2/stringpiece.h | 4 |
3 files changed, 0 insertions, 20 deletions
diff --git a/contrib/libs/re2/re2/re2.cc b/contrib/libs/re2/re2/re2.cc index 47fb385e4e..ad126d00bd 100644 --- a/contrib/libs/re2/re2/re2.cc +++ b/contrib/libs/re2/re2/re2.cc @@ -1050,14 +1050,12 @@ bool Parse(const char* str, size_t n, std::string* dest) { return true; } -#if defined(ARCADIA_ROOT) template <> bool Parse(const char* str, size_t n, TString* dest) { if (dest == NULL) return true; dest->assign(str, n); return true; } -#endif template <> bool Parse(const char* str, size_t n, StringPiece* dest) { diff --git a/contrib/libs/re2/re2/re2.h b/contrib/libs/re2/re2/re2.h index f8f8043daf..c9694d35ac 100644 --- a/contrib/libs/re2/re2/re2.h +++ b/contrib/libs/re2/re2/re2.h @@ -210,9 +210,7 @@ #include <string> #include <type_traits> #include <vector> -#if defined(ARCADIA_ROOT) #include <util/generic/string.h> -#endif #if defined(__APPLE__) #include <TargetConditionals.h> @@ -283,10 +281,8 @@ class RE2 { #endif RE2(const StringPiece& pattern); RE2(const StringPiece& pattern, const Options& options); -#if defined(ARCADIA_ROOT) // ambiguity resolution. RE2(const TString& pattern) : RE2(StringPiece(pattern)) {} -#endif ~RE2(); // Returns whether RE2 was created properly. @@ -464,7 +460,6 @@ class RE2 { static bool Replace(std::string* str, const RE2& re, const StringPiece& rewrite); -#if defined(ARCADIA_ROOT) static bool Replace(TString *str, const RE2& pattern, const StringPiece& rewrite) { @@ -473,7 +468,6 @@ class RE2 { *str = tmp; return res; } -#endif // Like Replace(), except replaces successive non-overlapping occurrences // of the pattern in the string with the rewrite. E.g. @@ -492,7 +486,6 @@ class RE2 { const RE2& re, const StringPiece& rewrite); -#if defined(ARCADIA_ROOT) static int GlobalReplace(TString* str, const RE2& pattern, const StringPiece& rewrite) { @@ -501,7 +494,6 @@ class RE2 { *str = tmp; return res; } -#endif // Like Replace, except that if the pattern matches, "rewrite" // is copied into "out" with substitutions. The non-matching @@ -516,7 +508,6 @@ class RE2 { const StringPiece& rewrite, std::string* out); -#if defined(ARCADIA_ROOT) static bool Extract(const StringPiece& text, const RE2& pattern, const StringPiece& rewrite, @@ -526,7 +517,6 @@ class RE2 { *out = tmp; return res; } -#endif // Escapes all potentially meaningful regexp characters in // 'unquoted'. The returned string, used as a regular expression, @@ -621,7 +611,6 @@ class RE2 { return CheckRewriteString(rewrite, static_cast<std::string*>(error)); } -#if defined(ARCADIA_ROOT) bool CheckRewriteString(const StringPiece& rewrite, TString* error) const { if (error) { std::string tmp; @@ -632,7 +621,6 @@ class RE2 { return CheckRewriteString(rewrite, nullptr); } } -#endif // Returns the maximum submatch needed for the rewrite to be done by // Replace(). E.g. if rewrite == "foo \\2,\\1", returns 2. @@ -847,9 +835,7 @@ template <typename T> struct Parse3ary : public std::false_type {}; template <> struct Parse3ary<void> : public std::true_type {}; template <> struct Parse3ary<std::string> : public std::true_type {}; template <> struct Parse3ary<StringPiece> : public std::true_type {}; -#if defined(ARCADIA_ROOT) template <> struct Parse3ary<TString> : public std::true_type {}; -#endif template <> struct Parse3ary<char> : public std::true_type {}; template <> struct Parse3ary<signed char> : public std::true_type {}; template <> struct Parse3ary<unsigned char> : public std::true_type {}; diff --git a/contrib/libs/re2/re2/stringpiece.h b/contrib/libs/re2/re2/stringpiece.h index ef73683401..ef7cef99e6 100644 --- a/contrib/libs/re2/re2/stringpiece.h +++ b/contrib/libs/re2/re2/stringpiece.h @@ -33,9 +33,7 @@ #if __has_include(<string_view>) && __cplusplus >= 201703L #include <string_view> #endif -#if defined(ARCADIA_ROOT) #include <util/generic/string.h> -#endif namespace re2 { @@ -70,10 +68,8 @@ class StringPiece { : data_(str), size_(str == NULL ? 0 : strlen(str)) {} StringPiece(const char* str, size_type len) : data_(str), size_(len) {} -#if defined(ARCADIA_ROOT) StringPiece(const TString& str) : StringPiece(str.data(), str.size()) {} -#endif const_iterator begin() const { return data_; } const_iterator end() const { return data_ + size_; } |