diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
commit | baa58daefa91fde4b4769facdbd2903763b9c6a8 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/deprecated/kmp/kmp.h | |
parent | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff) | |
download | ydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated/kmp/kmp.h')
-rw-r--r-- | library/cpp/deprecated/kmp/kmp.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/deprecated/kmp/kmp.h b/library/cpp/deprecated/kmp/kmp.h index 85090f6b2b..a7f72eece6 100644 --- a/library/cpp/deprecated/kmp/kmp.h +++ b/library/cpp/deprecated/kmp/kmp.h @@ -42,7 +42,7 @@ public: bool SubStr(const char* begin, const char* end, const char*& result) const { Y_ASSERT(begin <= end); - ssize_t m = Pattern.size(); + ssize_t m = Pattern.size(); ssize_t n = end - begin; ssize_t i, j; for (i = 0, j = 0; (i < n) && (j < m); ++i, ++j) { @@ -80,7 +80,7 @@ public: : Callback(callback) , Pattern(patternBegin, patternEnd) , State(0) - , Candidate(Pattern.size()) + , Candidate(Pattern.size()) { ssize_t* pf; ComputePrefixFunction(patternBegin, patternEnd, &pf); @@ -89,14 +89,14 @@ public: void Push(const T& symbol) { while ((State >= 0) && (Pattern[State] != symbol)) { - Y_ASSERT(State <= (ssize_t) Pattern.size()); + Y_ASSERT(State <= (ssize_t) Pattern.size()); State = PrefixFunction[State]; - Y_ASSERT(State <= (ssize_t) Pattern.size()); + Y_ASSERT(State <= (ssize_t) Pattern.size()); } if (State >= 0) Candidate[State] = symbol; ++State; - if (State == (ssize_t) Pattern.size()) { + if (State == (ssize_t) Pattern.size()) { Callback->OnMatch(Candidate.begin(), Candidate.end()); State = 0; } |