aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/binsaver/bin_saver.h
diff options
context:
space:
mode:
authormonster <monster@yandex-team.ru>2022-02-10 16:47:19 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:19 +0300
commitb23c1d7a8015c2006a148fd93b84cdeb0aee17a3 (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/binsaver/bin_saver.h
parentdd76ae1f6213d065375ab296699f764faafbe5bd (diff)
downloadydb-b23c1d7a8015c2006a148fd93b84cdeb0aee17a3.tar.gz
Restoring authorship annotation for <monster@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/binsaver/bin_saver.h')
-rw-r--r--library/cpp/binsaver/bin_saver.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h
index 0e9e46a2e5..412424889f 100644
--- a/library/cpp/binsaver/bin_saver.h
+++ b/library/cpp/binsaver/bin_saver.h
@@ -156,13 +156,13 @@ private:
}
}
- // hash_multimap
+ // hash_multimap
template <class AMM>
void DoAnyMultiMap(AMM& data) {
- if (IsReading()) {
- data.clear();
+ if (IsReading()) {
+ data.clear();
TStoredSize nSize;
- Add(3, &nSize);
+ Add(3, &nSize);
TVector<typename AMM::key_type, typename std::allocator_traits<typename AMM::allocator_type>::template rebind_alloc<typename AMM::key_type>> indices;
indices.resize(nSize);
for (TStoredSize i = 0; i < nSize; ++i)
@@ -170,19 +170,19 @@ private:
for (TStoredSize i = 0; i < nSize; ++i) {
std::pair<typename AMM::key_type, typename AMM::mapped_type> valToInsert;
valToInsert.first = indices[i];
- Add(2, &valToInsert.second);
- data.insert(valToInsert);
- }
- } else {
+ Add(2, &valToInsert.second);
+ data.insert(valToInsert);
+ }
+ } else {
TStoredSize nSize = data.size();
CheckOverflow(nSize, data.size());
- Add(3, &nSize);
+ Add(3, &nSize);
for (auto pos = data.begin(); pos != data.end(); ++pos)
Add(1, (typename AMM::key_type*)(&pos->first));
for (auto pos = data.begin(); pos != data.end(); ++pos)
- Add(2, &pos->second);
- }
- }
+ Add(2, &pos->second);
+ }
+ }
template <class T>
void DoAnySet(T& data) {
@@ -270,7 +270,7 @@ private:
IObjectBase* LoadObject();
bool bRead;
- TBufferedStream<> File;
+ TBufferedStream<> File;
// maps objects addresses during save(first) to addresses during load(second) - during loading
// or serves as a sign that some object has been already stored - during storing
bool StableOutput;
@@ -357,7 +357,7 @@ public:
int Add(const chunk_id, THashMultiMap<T1, T2, T3, T4, T5>* pHash) {
DoAnyMultiMap(*pHash);
return 0;
- }
+ }
template <class K, class L, class A>
int Add(const chunk_id, TSet<K, L, A>* pSet) {
DoAnySet(*pSet);