aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/binsaver/bin_saver.cpp
diff options
context:
space:
mode:
authorgulin <gulin@yandex-team.ru>2022-02-10 16:47:32 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:32 +0300
commit7199613d295246a07c2f7b331fbb3128936039dc (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/binsaver/bin_saver.cpp
parentc807aae441c17fc7f577c35757a4b6e0bd909802 (diff)
downloadydb-7199613d295246a07c2f7b331fbb3128936039dc.tar.gz
Restoring authorship annotation for <gulin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/binsaver/bin_saver.cpp')
-rw-r--r--library/cpp/binsaver/bin_saver.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/binsaver/bin_saver.cpp b/library/cpp/binsaver/bin_saver.cpp
index c5702bf2ac..fe0775af9f 100644
--- a/library/cpp/binsaver/bin_saver.cpp
+++ b/library/cpp/binsaver/bin_saver.cpp
@@ -28,16 +28,16 @@ void IBinSaver::StoreObject(IObjectBase* pObject) {
if (pFound != PtrIds->end())
id = pFound->second;
else {
- id = PtrIds->ysize() + 1;
+ id = PtrIds->ysize() + 1;
PtrIds->insert(std::make_pair(pObject, id));
}
}
- ptrId = id;
+ ptrId = id;
}
DataChunk(&ptrId, sizeof(ptrId));
- if (!Objects.Get())
- Objects.Reset(new CObjectsHash);
+ if (!Objects.Get())
+ Objects.Reset(new CObjectsHash);
if (ptrId != 0 && Objects->find(ptrId) == Objects->end()) {
ObjectQueue.push_back(pObject);
(*Objects)[ptrId];
@@ -51,13 +51,13 @@ void IBinSaver::StoreObject(IObjectBase* pObject) {
}
IObjectBase* IBinSaver::LoadObject() {
- ui64 ptrId = 0;
- DataChunk(&ptrId, sizeof(ptrId));
- if (ptrId != 0) {
- if (!Objects.Get())
- Objects.Reset(new CObjectsHash);
- CObjectsHash::iterator pFound = Objects->find(ptrId);
- if (pFound != Objects->end())
+ ui64 ptrId = 0;
+ DataChunk(&ptrId, sizeof(ptrId));
+ if (ptrId != 0) {
+ if (!Objects.Get())
+ Objects.Reset(new CObjectsHash);
+ CObjectsHash::iterator pFound = Objects->find(ptrId);
+ if (pFound != Objects->end())
return pFound->second;
int typeId;
DataChunk(&typeId, sizeof(typeId));
@@ -67,7 +67,7 @@ IObjectBase* IBinSaver::LoadObject() {
fprintf(stderr, "IBinSaver: trying to load unregistered object\n");
abort();
}
- (*Objects)[ptrId] = pObj;
+ (*Objects)[ptrId] = pObj;
ObjectQueue.push_back(pObj);
return pObj;
}
@@ -75,7 +75,7 @@ IObjectBase* IBinSaver::LoadObject() {
}
IBinSaver::~IBinSaver() {
- for (size_t i = 0; i < ObjectQueue.size(); ++i) {
+ for (size_t i = 0; i < ObjectQueue.size(); ++i) {
AddPolymorphicBase(1, ObjectQueue[i]);
}
}