aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/kmp/kmp.cpp
diff options
context:
space:
mode:
authordenplusplus <denplusplus@yandex-team.ru>2022-02-10 16:47:34 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:34 +0300
commitaddb3626ed629a8c7d9c8c30e87365b478a8c266 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/deprecated/kmp/kmp.cpp
parent57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (diff)
downloadydb-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.cpp32
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);
+}