diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/binsaver/bin_saver.h | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/binsaver/bin_saver.h')
-rw-r--r-- | library/cpp/binsaver/bin_saver.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h index 412424889f..f37612c4fc 100644 --- a/library/cpp/binsaver/bin_saver.h +++ b/library/cpp/binsaver/bin_saver.h @@ -6,13 +6,13 @@ #include <library/cpp/containers/2d_array/2d_array.h> #include <util/generic/hash_set.h> -#include <util/generic/buffer.h> +#include <util/generic/buffer.h> #include <util/generic/list.h> #include <util/generic/maybe.h> #include <util/generic/bitmap.h> #include <util/generic/variant.h> #include <util/generic/ylimits.h> -#include <util/memory/blob.h> +#include <util/memory/blob.h> #include <util/digest/murmur.h> #include <array> @@ -267,7 +267,7 @@ private: // storing/loading pointers to objects void StoreObject(IObjectBase* pObject); - IObjectBase* LoadObject(); + IObjectBase* LoadObject(); bool bRead; TBufferedStream<> File; @@ -310,21 +310,21 @@ public: return 0; } int Add(const chunk_id, TBlob* blob) { - if (bRead) { - ui64 size = 0; - File.Read(&size, sizeof(size)); + if (bRead) { + ui64 size = 0; + File.Read(&size, sizeof(size)); TBuffer buffer; buffer.Advance(size); - if (size > 0) - File.Read(buffer.Data(), buffer.Size()); + if (size > 0) + File.Read(buffer.Data(), buffer.Size()); (*blob) = TBlob::FromBuffer(buffer); - } else { - const ui64 size = blob->Size(); - File.Write(&size, sizeof(size)); - File.Write(blob->Data(), blob->Size()); - } - return 0; - } + } else { + const ui64 size = blob->Size(); + File.Write(&size, sizeof(size)); + File.Write(blob->Data(), blob->Size()); + } + return 0; + } template <class T1, class TA> int Add(const chunk_id, TVector<T1, TA>* pVec) { if (HasNonTrivialSerializer<T1>(0u)) @@ -629,7 +629,7 @@ struct TRegisterSaveLoadType { int operator&(IBinSaver& f) override { \ f.AddMulti(__VA_ARGS__); \ return 0; \ - } + } #define SAVELOAD_OVERRIDE(base, ...) \ int operator&(IBinSaver& f) override { \ |