aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/kmp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/deprecated/kmp
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated/kmp')
-rw-r--r--library/cpp/deprecated/kmp/kmp.cpp2
-rw-r--r--library/cpp/deprecated/kmp/kmp.h8
-rw-r--r--library/cpp/deprecated/kmp/kmp_ut.cpp6
-rw-r--r--library/cpp/deprecated/kmp/ut/ya.make16
-rw-r--r--library/cpp/deprecated/kmp/ya.make20
5 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/deprecated/kmp/kmp.cpp b/library/cpp/deprecated/kmp/kmp.cpp
index cb577b139f..d02074c94a 100644
--- a/library/cpp/deprecated/kmp/kmp.cpp
+++ b/library/cpp/deprecated/kmp/kmp.cpp
@@ -8,7 +8,7 @@ TKMPMatcher::TKMPMatcher(const char* patternBegin, const char* patternEnd)
ComputePrefixFunction();
}
-TKMPMatcher::TKMPMatcher(const TString& pattern)
+TKMPMatcher::TKMPMatcher(const TString& pattern)
: Pattern(pattern)
{
ComputePrefixFunction();
diff --git a/library/cpp/deprecated/kmp/kmp.h b/library/cpp/deprecated/kmp/kmp.h
index 287382821d..a7f72eece6 100644
--- a/library/cpp/deprecated/kmp/kmp.h
+++ b/library/cpp/deprecated/kmp/kmp.h
@@ -1,7 +1,7 @@
#pragma once
#include <util/generic/ptr.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/vector.h>
#include <util/generic/yexception.h>
@@ -32,13 +32,13 @@ void ComputePrefixFunction(const T* begin, const T* end, ssize_t** result) {
class TKMPMatcher {
private:
TArrayHolder<ssize_t> PrefixFunction;
- TString Pattern;
+ TString Pattern;
void ComputePrefixFunction();
public:
TKMPMatcher(const char* patternBegin, const char* patternEnd);
- TKMPMatcher(const TString& pattern);
+ TKMPMatcher(const TString& pattern);
bool SubStr(const char* begin, const char* end, const char*& result) const {
Y_ASSERT(begin <= end);
@@ -70,7 +70,7 @@ public:
private:
ICallback* Callback;
TArrayHolder<ssize_t> PrefixFunction;
- using TTVector = TVector<T>;
+ using TTVector = TVector<T>;
TTVector Pattern;
ssize_t State;
TTVector Candidate;
diff --git a/library/cpp/deprecated/kmp/kmp_ut.cpp b/library/cpp/deprecated/kmp/kmp_ut.cpp
index 04e7cf2701..c2eda83c57 100644
--- a/library/cpp/deprecated/kmp/kmp_ut.cpp
+++ b/library/cpp/deprecated/kmp/kmp_ut.cpp
@@ -4,8 +4,8 @@
#include <util/stream/output.h>
-static TVector<int> FindAll(const TString& pattern, const TString& string) {
- TVector<int> result;
+static TVector<int> FindAll(const TString& pattern, const TString& string) {
+ TVector<int> result;
TKMPMatcher kmp(pattern);
const char* pResult;
const char* begin = string.begin();
@@ -25,7 +25,7 @@ class TTestKMP: public TTestBase {
public:
void Test() {
- TVector<int> ans = {0, 2};
+ TVector<int> ans = {0, 2};
UNIT_ASSERT_EQUAL(FindAll("a", "aba"), ans);
ans = {0};
UNIT_ASSERT_EQUAL(FindAll("aba", "aba"), ans);
diff --git a/library/cpp/deprecated/kmp/ut/ya.make b/library/cpp/deprecated/kmp/ut/ya.make
index e19f716c82..9c54ee2715 100644
--- a/library/cpp/deprecated/kmp/ut/ya.make
+++ b/library/cpp/deprecated/kmp/ut/ya.make
@@ -1,9 +1,9 @@
UNITTEST_FOR(library/cpp/deprecated/kmp)
-
-OWNER(g:util)
-
-SRCS(
- kmp_ut.cpp
-)
-
-END()
+
+OWNER(g:util)
+
+SRCS(
+ kmp_ut.cpp
+)
+
+END()
diff --git a/library/cpp/deprecated/kmp/ya.make b/library/cpp/deprecated/kmp/ya.make
index f8969a33a5..7c1c557934 100644
--- a/library/cpp/deprecated/kmp/ya.make
+++ b/library/cpp/deprecated/kmp/ya.make
@@ -1,10 +1,10 @@
-LIBRARY()
-
-OWNER(g:util)
-
-SRCS(
- kmp.cpp
- kmp.h
-)
-
-END()
+LIBRARY()
+
+OWNER(g:util)
+
+SRCS(
+ kmp.cpp
+ kmp.h
+)
+
+END()