aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/codecs/greedy_dict
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/codecs/greedy_dict
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/codecs/greedy_dict')
-rw-r--r--library/cpp/codecs/greedy_dict/gd_builder.cpp2
-rw-r--r--library/cpp/codecs/greedy_dict/gd_entry.cpp4
-rw-r--r--library/cpp/codecs/greedy_dict/gd_entry.h12
3 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/codecs/greedy_dict/gd_builder.cpp b/library/cpp/codecs/greedy_dict/gd_builder.cpp
index 561bfbca01..ea4ec0d65c 100644
--- a/library/cpp/codecs/greedy_dict/gd_builder.cpp
+++ b/library/cpp/codecs/greedy_dict/gd_builder.cpp
@@ -116,7 +116,7 @@ namespace NGreedyDict {
ui32 TDictBuilder::Build(ui32 maxentries, ui32 maxiters, ui32 mindiff) {
size_t totalsz = 0;
for (auto it : Input)
- totalsz += it.size();
+ totalsz += it.size();
while (maxiters) {
maxiters--;
diff --git a/library/cpp/codecs/greedy_dict/gd_entry.cpp b/library/cpp/codecs/greedy_dict/gd_entry.cpp
index 2c315c7f7c..0580d14e1d 100644
--- a/library/cpp/codecs/greedy_dict/gd_entry.cpp
+++ b/library/cpp/codecs/greedy_dict/gd_entry.cpp
@@ -41,11 +41,11 @@ namespace NGreedyDict {
size_t len = 0;
ui32 val = 0;
- if (builder.FindLongestPrefix(suff.data(), suff.size(), &len, &val) && len) {
+ if (builder.FindLongestPrefix(suff.data(), suff.size(), &len, &val) && len) {
it->NearestPrefix = val;
}
- builder.Add(suff.data(), suff.size(), it->Number);
+ builder.Add(suff.data(), suff.size(), it->Number);
}
TBufferOutput bout;
diff --git a/library/cpp/codecs/greedy_dict/gd_entry.h b/library/cpp/codecs/greedy_dict/gd_entry.h
index 18b5be0e15..2ddbd7531b 100644
--- a/library/cpp/codecs/greedy_dict/gd_entry.h
+++ b/library/cpp/codecs/greedy_dict/gd_entry.h
@@ -34,7 +34,7 @@ namespace NGreedyDict {
return NearestPrefix != NoPrefix;
}
ui32 Len() const {
- return Str.size();
+ return Str.size();
}
static bool StrLess(const TEntry& a, const TEntry& b) {
@@ -58,14 +58,14 @@ namespace NGreedyDict {
void InitWithAlpha();
void Add(TStringBuf a) {
- push_back(TStringBuf(Pool.Append(a.data(), a.size()), a.size()));
+ push_back(TStringBuf(Pool.Append(a.data(), a.size()), a.size()));
}
void Add(TStringBuf a, TStringBuf b) {
- size_t sz = a.size() + b.size();
+ size_t sz = a.size() + b.size();
char* p = (char*)Pool.Allocate(sz);
- memcpy(p, a.data(), a.size());
- memcpy(p + a.size(), b.data(), b.size());
+ memcpy(p, a.data(), a.size());
+ memcpy(p + a.size(), b.data(), b.size());
push_back(TStringBuf(p, sz));
}
@@ -92,7 +92,7 @@ namespace NGreedyDict {
const TEntry& p = Get(e.NearestPrefix);
suff = e.Str;
- suff.Skip(p.Str.size());
+ suff.Skip(p.Str.size());
return &p;
}