diff options
author | akhropov <akhropov@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (patch) | |
tree | cb7a9f4a92c0d4cc5a86eeed49ad71e810953c1f /library/cpp/binsaver/util_stream_io.h | |
parent | 83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (diff) | |
download | ydb-00afc96e9c0298054b7386fa7fb9e3cc3d67b974.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/binsaver/util_stream_io.h')
-rw-r--r-- | library/cpp/binsaver/util_stream_io.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/binsaver/util_stream_io.h b/library/cpp/binsaver/util_stream_io.h index d65d630b93..31d8df5351 100644 --- a/library/cpp/binsaver/util_stream_io.h +++ b/library/cpp/binsaver/util_stream_io.h @@ -4,11 +4,11 @@ #include <util/stream/input.h> #include <util/stream/output.h> -#include <util/stream/file.h> +#include <util/stream/file.h> class TYaStreamInput: public IBinaryStream { IInputStream& Stream; - + int WriteImpl(const void*, int) override { Y_ASSERT(0); return 0; @@ -41,13 +41,13 @@ inline void SerializeFromStream(IInputStream& stream, T& c) { template <class T> inline void SerializeFromFile(const TString& fileName, T& c) { - TIFStream in(fileName); - SerializeFromStream(in, c); -} - + TIFStream in(fileName); + SerializeFromStream(in, c); +} + class TYaStreamOutput: public IBinaryStream { IOutputStream& Stream; - + int WriteImpl(const void* what, int size) override { Stream.Write(what, (size_t)size); return size; @@ -78,9 +78,9 @@ inline void SerializeToArcadiaStream(IOutputStream& stream, T& c) { bs.Add(1, &c); } } - + template <class T> inline void SerializeToFile(const TString& fileName, T& c) { - TOFStream out(fileName); + TOFStream out(fileName); SerializeToArcadiaStream(out, c); -} +} |