aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/re2
diff options
context:
space:
mode:
authorsomov <somov@yandex-team.ru>2022-02-10 16:45:47 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:47 +0300
commita5950576e397b1909261050b8c7da16db58f10b1 (patch)
tree7ba7677f6a4c3e19e2cefab34d16df2c8963b4d4 /contrib/libs/re2
parent81eddc8c0b55990194e112b02d127b87d54164a9 (diff)
downloadydb-a5950576e397b1909261050b8c7da16db58f10b1.tar.gz
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/re2')
-rw-r--r--contrib/libs/re2/re2/re2.cc4
-rw-r--r--contrib/libs/re2/re2/re2.h28
-rw-r--r--contrib/libs/re2/re2/stringpiece.h8
3 files changed, 20 insertions, 20 deletions
diff --git a/contrib/libs/re2/re2/re2.cc b/contrib/libs/re2/re2/re2.cc
index 47fb385e4e..4637322b08 100644
--- a/contrib/libs/re2/re2/re2.cc
+++ b/contrib/libs/re2/re2/re2.cc
@@ -1050,14 +1050,14 @@ bool Parse(const char* str, size_t n, std::string* dest) {
return true;
}
-#if defined(ARCADIA_ROOT)
+#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
+#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..28c3fc708f 100644
--- a/contrib/libs/re2/re2/re2.h
+++ b/contrib/libs/re2/re2/re2.h
@@ -210,9 +210,9 @@
#include <string>
#include <type_traits>
#include <vector>
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
#include <util/generic/string.h>
-#endif
+#endif
#if defined(__APPLE__)
#include <TargetConditionals.h>
@@ -283,10 +283,10 @@ class RE2 {
#endif
RE2(const StringPiece& pattern);
RE2(const StringPiece& pattern, const Options& options);
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
// ambiguity resolution.
RE2(const TString& pattern) : RE2(StringPiece(pattern)) {}
-#endif
+#endif
~RE2();
// Returns whether RE2 was created properly.
@@ -464,7 +464,7 @@ class RE2 {
static bool Replace(std::string* str,
const RE2& re,
const StringPiece& rewrite);
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
static bool Replace(TString *str,
const RE2& pattern,
const StringPiece& rewrite) {
@@ -473,7 +473,7 @@ class RE2 {
*str = tmp;
return res;
}
-#endif
+#endif
// Like Replace(), except replaces successive non-overlapping occurrences
// of the pattern in the string with the rewrite. E.g.
@@ -492,7 +492,7 @@ class RE2 {
const RE2& re,
const StringPiece& rewrite);
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
static int GlobalReplace(TString* str,
const RE2& pattern,
const StringPiece& rewrite) {
@@ -501,7 +501,7 @@ class RE2 {
*str = tmp;
return res;
}
-#endif
+#endif
// Like Replace, except that if the pattern matches, "rewrite"
// is copied into "out" with substitutions. The non-matching
@@ -516,7 +516,7 @@ class RE2 {
const StringPiece& rewrite,
std::string* out);
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
static bool Extract(const StringPiece& text,
const RE2& pattern,
const StringPiece& rewrite,
@@ -526,7 +526,7 @@ class RE2 {
*out = tmp;
return res;
}
-#endif
+#endif
// Escapes all potentially meaningful regexp characters in
// 'unquoted'. The returned string, used as a regular expression,
@@ -621,7 +621,7 @@ class RE2 {
return CheckRewriteString(rewrite, static_cast<std::string*>(error));
}
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
bool CheckRewriteString(const StringPiece& rewrite, TString* error) const {
if (error) {
std::string tmp;
@@ -632,7 +632,7 @@ class RE2 {
return CheckRewriteString(rewrite, nullptr);
}
}
-#endif
+#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 +847,9 @@ 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)
+#if defined(ARCADIA_ROOT)
template <> struct Parse3ary<TString> : public std::true_type {};
-#endif
+#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..aeec0490d4 100644
--- a/contrib/libs/re2/re2/stringpiece.h
+++ b/contrib/libs/re2/re2/stringpiece.h
@@ -33,9 +33,9 @@
#if __has_include(<string_view>) && __cplusplus >= 201703L
#include <string_view>
#endif
-#if defined(ARCADIA_ROOT)
+#if defined(ARCADIA_ROOT)
#include <util/generic/string.h>
-#endif
+#endif
namespace re2 {
@@ -70,10 +70,10 @@ 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)
+#if defined(ARCADIA_ROOT)
StringPiece(const TString& str)
: StringPiece(str.data(), str.size()) {}
-#endif
+#endif
const_iterator begin() const { return data_; }
const_iterator end() const { return data_ + size_; }