diff options
author | prime <prime@yandex-team.ru> | 2022-02-10 16:46:00 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:00 +0300 |
commit | 3695a7cd42b74a4987d8d5a8f2e2443556998943 (patch) | |
tree | ee79ee9294a61ee00e647684b3700d0a87e102a3 /library/cpp/monlib/encode/buffered/string_pool.cpp | |
parent | 4d8b546b89b5afc08cf3667e176271c7ba935f33 (diff) | |
download | ydb-3695a7cd42b74a4987d8d5a8f2e2443556998943.tar.gz |
Restoring authorship annotation for <prime@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/buffered/string_pool.cpp')
-rw-r--r-- | library/cpp/monlib/encode/buffered/string_pool.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/monlib/encode/buffered/string_pool.cpp b/library/cpp/monlib/encode/buffered/string_pool.cpp index b4c7988ba3..d819e11ae7 100644 --- a/library/cpp/monlib/encode/buffered/string_pool.cpp +++ b/library/cpp/monlib/encode/buffered/string_pool.cpp @@ -10,8 +10,8 @@ namespace NMonitoring { auto [it, isInserted] = StrMap_.try_emplace(str, Max<ui32>(), 0); if (isInserted) { BytesSize_ += str.size(); - it->second.Index = StrVector_.size(); - StrVector_.emplace_back(it->first, &it->second); + it->second.Index = StrVector_.size(); + StrVector_.emplace_back(it->first, &it->second); } TValue* value = &it->second; @@ -19,10 +19,10 @@ namespace NMonitoring { return value; } - const TStringPoolBuilder::TValue* TStringPoolBuilder::GetByIndex(ui32 index) const { - return StrVector_.at(index).second; - } - + const TStringPoolBuilder::TValue* TStringPoolBuilder::GetByIndex(ui32 index) const { + return StrVector_.at(index).second; + } + TStringPoolBuilder& TStringPoolBuilder::Build() { if (RequiresSorting_) { // sort in reversed order @@ -30,10 +30,10 @@ namespace NMonitoring { return a.second->Frequency > b.second->Frequency; }); - ui32 i = 0; - for (auto& value : StrVector_) { - value.second->Index = i++; - } + ui32 i = 0; + for (auto& value : StrVector_) { + value.second->Index = i++; + } } IsBuilt_ = true; |