diff options
author | agorodilov <agorodilov@yandex-team.ru> | 2022-02-10 16:47:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:09 +0300 |
commit | 7a4979e6211c3e78c7f9041d4a9e5d3405343c36 (patch) | |
tree | 9e9943579e5a14679af7cd2cda3c36d8c0b775d3 /library/cpp/regex/pcre | |
parent | 676340c42e269f3070f194d160f42a83a10568d4 (diff) | |
download | ydb-7a4979e6211c3e78c7f9041d4a9e5d3405343c36.tar.gz |
Restoring authorship annotation for <agorodilov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/regex/pcre')
-rw-r--r-- | library/cpp/regex/pcre/regexp.cpp | 10 | ||||
-rw-r--r-- | library/cpp/regex/pcre/regexp.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/regex/pcre/regexp.cpp b/library/cpp/regex/pcre/regexp.cpp index 575c09cee4..e688a3cc84 100644 --- a/library/cpp/regex/pcre/regexp.cpp +++ b/library/cpp/regex/pcre/regexp.cpp @@ -241,12 +241,12 @@ TRegExMatch::TRegExMatch(const TString& re, int cflags) } bool TRegExMatch::Match(const char* str) const { - return Exec(str, nullptr, 0, 0) == 0; + return Exec(str, nullptr, 0, 0) == 0; } TRegExSubst::TRegExSubst(const char* re, int cflags) : TRegExBase(re, cflags) - , Replacement(nullptr) + , Replacement(nullptr) { memset(Brfs, 0, sizeof(TBackReferences) * NMATCHES); } @@ -285,8 +285,8 @@ int TRegExSubst::ParseReplacement(const char* repl) { if (!Replacement || *Replacement == 0) return 0; char* pos = (char*)Replacement; - char* pos1 = nullptr; - char* pos2 = nullptr; + char* pos1 = nullptr; + char* pos2 = nullptr; int i = 0; while (pos && *pos && i < NMATCHES) { pos1 = strchr(pos, '$'); @@ -306,7 +306,7 @@ int TRegExSubst::ParseReplacement(const char* repl) { } } Brfs[i].Beg = int(pos - (char*)Replacement); - Brfs[i].End = (pos1 == nullptr ? (int)strlen(Replacement) : int(pos1 - Replacement)); + Brfs[i].End = (pos1 == nullptr ? (int)strlen(Replacement) : int(pos1 - Replacement)); pos = pos2; i++; } diff --git a/library/cpp/regex/pcre/regexp.h b/library/cpp/regex/pcre/regexp.h index bc610bd2f3..ab49726a53 100644 --- a/library/cpp/regex/pcre/regexp.h +++ b/library/cpp/regex/pcre/regexp.h @@ -21,7 +21,7 @@ protected: TSimpleIntrusivePtr<TRegExBaseImpl> Impl; public: - TRegExBase(const char* regExpr = nullptr, int cflags = REG_EXTENDED); + TRegExBase(const char* regExpr = nullptr, int cflags = REG_EXTENDED); TRegExBase(const TString& regExpr, int cflags = REG_EXTENDED); virtual ~TRegExBase(); @@ -35,7 +35,7 @@ public: class TRegExMatch: public TRegExBase { public: - TRegExMatch(const char* regExpr = nullptr, int cflags = REG_NOSUB | REG_EXTENDED); + TRegExMatch(const char* regExpr = nullptr, int cflags = REG_NOSUB | REG_EXTENDED); TRegExMatch(const TString& regExpr, int cflags = REG_NOSUB | REG_EXTENDED); bool Match(const char* str) const; @@ -56,7 +56,7 @@ private: int BrfsCount; public: - TRegExSubst(const char* regExpr = nullptr, int cflags = REG_EXTENDED); + TRegExSubst(const char* regExpr = nullptr, int cflags = REG_EXTENDED); TString Replace(const char* str, int eflags = 0); int ParseReplacement(const char* replacement); |