diff options
| author | yazevnul <[email protected]> | 2022-02-10 16:46:46 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:46 +0300 |
| commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
| tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/deprecated/kmp | |
| parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/deprecated/kmp')
| -rw-r--r-- | library/cpp/deprecated/kmp/kmp.h | 8 | ||||
| -rw-r--r-- | library/cpp/deprecated/kmp/kmp_ut.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/deprecated/kmp/kmp.h b/library/cpp/deprecated/kmp/kmp.h index a7f72eece6a..ce7783e2fcc 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 c2eda83c57a..dc60429596d 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()); } }; |
