aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/kmp/kmp.h
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commit3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch)
tree26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/deprecated/kmp/kmp.h
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/deprecated/kmp/kmp.h')
-rw-r--r--library/cpp/deprecated/kmp/kmp.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/deprecated/kmp/kmp.h b/library/cpp/deprecated/kmp/kmp.h
index a7f72eece6..85090f6b2b 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;
}