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 | bd5ef432f5cfb1e18851381329d94665a4c22470 (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /library/cpp/regex/pcre/regexp.cpp | |
parent | 7a4979e6211c3e78c7f9041d4a9e5d3405343c36 (diff) | |
download | ydb-bd5ef432f5cfb1e18851381329d94665a4c22470.tar.gz |
Restoring authorship annotation for <agorodilov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/regex/pcre/regexp.cpp')
-rw-r--r-- | library/cpp/regex/pcre/regexp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/regex/pcre/regexp.cpp b/library/cpp/regex/pcre/regexp.cpp index e688a3cc84..575c09cee4 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++; } |