diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/binsaver/blob_io.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/binsaver/blob_io.h')
-rw-r--r-- | library/cpp/binsaver/blob_io.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/binsaver/blob_io.h b/library/cpp/binsaver/blob_io.h index efde51fe88..abe518ef30 100644 --- a/library/cpp/binsaver/blob_io.h +++ b/library/cpp/binsaver/blob_io.h @@ -5,15 +5,15 @@ #include <util/memory/blob.h> -class TYaBlobStream: public IBinaryStream { +class TYaBlobStream: public IBinaryStream { TBlob Blob; i64 Pos; - int WriteImpl(const void*, int) override { + int WriteImpl(const void*, int) override { Y_ASSERT(0); return 0; } - int ReadImpl(void* userBuffer, int size) override { + int ReadImpl(void* userBuffer, int size) override { if (size == 0) return 0; i64 res = Min<i64>(Blob.Length() - Pos, size); @@ -22,23 +22,23 @@ class TYaBlobStream: public IBinaryStream { Pos += res; return res; } - bool IsValid() const override { - return true; - } - bool IsFailed() const override { - return false; - } - + bool IsValid() const override { + return true; + } + bool IsFailed() const override { + return false; + } + public: - TYaBlobStream(const TBlob& blob) - : Blob(blob) - , Pos(0) - { - } + TYaBlobStream(const TBlob& blob) + : Blob(blob) + , Pos(0) + { + } }; -template <class T> -inline void SerializeBlob(const TBlob& data, T& c) { +template <class T> +inline void SerializeBlob(const TBlob& data, T& c) { TYaBlobStream f(data); { IBinSaver bs(f, true); |