diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/cpp/yson_pull/detail/output/stdio_file.h | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yson_pull/detail/output/stdio_file.h')
-rw-r--r-- | library/cpp/yson_pull/detail/output/stdio_file.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/yson_pull/detail/output/stdio_file.h b/library/cpp/yson_pull/detail/output/stdio_file.h index 03f2b40dc5..d59ea6bfb9 100644 --- a/library/cpp/yson_pull/detail/output/stdio_file.h +++ b/library/cpp/yson_pull/detail/output/stdio_file.h @@ -1,33 +1,33 @@ -#pragma once - -#include "buffered.h" - +#pragma once + +#include "buffered.h" + #include <library/cpp/yson_pull/detail/macros.h> - + #include <library/cpp/yson_pull/exceptions.h> - -#include <cstdio> - + +#include <cstdio> + namespace NYsonPull { namespace NDetail { namespace NOutput { class TStdioFile: public TBuffered<TStdioFile> { FILE* file_; - + public: TStdioFile(FILE* file, size_t buffer_size) : TBuffered<TStdioFile>(buffer_size) , file_(file) { } - + void write(TStringBuf data) { auto nwritten = ::fwrite(data.data(), 1, data.size(), file_); - if (Y_UNLIKELY(static_cast<size_t>(nwritten) != data.size())) { + if (Y_UNLIKELY(static_cast<size_t>(nwritten) != data.size())) { throw NException::TSystemError(); } } }; - } + } } // namespace NDetail } |