diff options
author | denplusplus <denplusplus@yandex-team.ru> | 2022-02-10 16:47:34 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:34 +0300 |
commit | addb3626ed629a8c7d9c8c30e87365b478a8c266 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/deprecated/kmp/kmp.cpp | |
parent | 57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (diff) | |
download | ydb-addb3626ed629a8c7d9c8c30e87365b478a8c266.tar.gz |
Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated/kmp/kmp.cpp')
-rw-r--r-- | library/cpp/deprecated/kmp/kmp.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/deprecated/kmp/kmp.cpp b/library/cpp/deprecated/kmp/kmp.cpp index d9bb37fb5b..d02074c94a 100644 --- a/library/cpp/deprecated/kmp/kmp.cpp +++ b/library/cpp/deprecated/kmp/kmp.cpp @@ -1,21 +1,21 @@ #include "kmp.h" #include <util/generic/yexception.h> - -TKMPMatcher::TKMPMatcher(const char* patternBegin, const char* patternEnd) - : Pattern(patternBegin, patternEnd) -{ - ComputePrefixFunction(); -} - + +TKMPMatcher::TKMPMatcher(const char* patternBegin, const char* patternEnd) + : Pattern(patternBegin, patternEnd) +{ + ComputePrefixFunction(); +} + TKMPMatcher::TKMPMatcher(const TString& pattern) - : Pattern(pattern) -{ - ComputePrefixFunction(); -} - -void TKMPMatcher::ComputePrefixFunction() { - ssize_t* pf; + : Pattern(pattern) +{ + ComputePrefixFunction(); +} + +void TKMPMatcher::ComputePrefixFunction() { + ssize_t* pf; ::ComputePrefixFunction(Pattern.data(), Pattern.data() + Pattern.size(), &pf); - PrefixFunction.Reset(pf); -} + PrefixFunction.Reset(pf); +} |