aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/write_trie_backwards.cpp
diff options
context:
space:
mode:
authorsereglond <sereglond@yandex-team.ru>2022-02-10 16:47:47 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:47 +0300
commit73bb02f2495181e0719a800f979df508924f4b71 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/containers/comptrie/write_trie_backwards.cpp
parenteb3d925534734c808602b31b38b953677f0a279f (diff)
downloadydb-73bb02f2495181e0719a800f979df508924f4b71.tar.gz
Restoring authorship annotation for <sereglond@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/write_trie_backwards.cpp')
-rw-r--r--library/cpp/containers/comptrie/write_trie_backwards.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/containers/comptrie/write_trie_backwards.cpp b/library/cpp/containers/comptrie/write_trie_backwards.cpp
index 9b124310dc..fd8c28b0ed 100644
--- a/library/cpp/containers/comptrie/write_trie_backwards.cpp
+++ b/library/cpp/containers/comptrie/write_trie_backwards.cpp
@@ -6,7 +6,7 @@
#include <util/generic/buffer.h>
#include <util/generic/vector.h>
-namespace NCompactTrie {
+namespace NCompactTrie {
size_t WriteTrieBackwards(IOutputStream& os, TReverseNodeEnumerator& enumerator, bool verbose) {
if (verbose) {
Cerr << "Writing down the trie..." << Endl;
@@ -37,7 +37,7 @@ namespace NCompactTrie {
Y_ASSERT(nodelength <= bufferLength);
resultLength += nodelength;
-
+
if (chunkLength + nodelength <= chunksize) {
chunkLength += nodelength;
memcpy(chunkend - chunkLength, buffer, nodelength);
@@ -55,11 +55,11 @@ namespace NCompactTrie {
resultData.push_back(new char[chunksize]);
chunkend = resultData.back() + chunksize;
}
-
+
memcpy(chunkend - chunkLength, buffer, chunkLength);
- }
+ }
}
-
+
if (verbose)
Cerr << counter << Endl;
@@ -79,7 +79,7 @@ namespace NCompactTrie {
char* data = const_cast<char*>(trie.Data);
char* end = data + trie.Length;
char* pos = end;
-
+
TVector<char> buf(64);
while (enumerator.Move()) {
size_t nodeLength = enumerator.RecreateNode(nullptr, end - pos);