aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/kmp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/deprecated/kmp
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated/kmp')
-rw-r--r--library/cpp/deprecated/kmp/kmp.h8
-rw-r--r--library/cpp/deprecated/kmp/kmp_ut.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/deprecated/kmp/kmp.h b/library/cpp/deprecated/kmp/kmp.h
index ce7783e2fc..a7f72eece6 100644
--- a/library/cpp/deprecated/kmp/kmp.h
+++ b/library/cpp/deprecated/kmp/kmp.h
@@ -18,9 +18,9 @@ void ComputePrefixFunction(const T* begin, const T* end, ssize_t** result) {
j = resultHolder[j];
++i;
++j;
- Y_ASSERT(i >= 0);
- Y_ASSERT(j >= 0);
- Y_ASSERT(j < len);
+ Y_ASSERT(i >= 0);
+ Y_ASSERT(j >= 0);
+ Y_ASSERT(j < len);
if ((i < len) && (begin[i] == begin[j]))
resultHolder[i] = resultHolder[j];
else
@@ -41,7 +41,7 @@ public:
TKMPMatcher(const TString& pattern);
bool SubStr(const char* begin, const char* end, const char*& result) const {
- Y_ASSERT(begin <= end);
+ Y_ASSERT(begin <= end);
ssize_t m = Pattern.size();
ssize_t n = end - begin;
ssize_t i, j;
diff --git a/library/cpp/deprecated/kmp/kmp_ut.cpp b/library/cpp/deprecated/kmp/kmp_ut.cpp
index dc60429596..c2eda83c57 100644
--- a/library/cpp/deprecated/kmp/kmp_ut.cpp
+++ b/library/cpp/deprecated/kmp/kmp_ut.cpp
@@ -71,8 +71,8 @@ public:
int data[] = {1, 2, 3, 5, 2, 2, 3, 2, 4, 3, 2};
TKMPSimpleCallback callback(pattern, pattern + 2);
TKMPStreamMatcher<int> matcher(pattern, pattern + 2, &callback);
- for (auto& i : data)
- matcher.Push(i);
+ for (auto& i : data)
+ matcher.Push(i);
UNIT_ASSERT_EQUAL(2, callback.GetCount());
}
};