diff options
author | vmordovin <vmordovin@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
commit | 7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (patch) | |
tree | 17073f853e6b3a1a95708e8aa0ea12fa42a717e7 /library/cpp/streams/bzip2/bzip2.cpp | |
parent | 466f96709329ff77ded50177df94d1893a226c00 (diff) | |
download | ydb-7c7f9bbcf57e15838d15afa94b31d8254b5d7776.tar.gz |
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/streams/bzip2/bzip2.cpp')
-rw-r--r-- | library/cpp/streams/bzip2/bzip2.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/streams/bzip2/bzip2.cpp b/library/cpp/streams/bzip2/bzip2.cpp index bccc5c6807..d2c02e3bae 100644 --- a/library/cpp/streams/bzip2/bzip2.cpp +++ b/library/cpp/streams/bzip2/bzip2.cpp @@ -182,23 +182,23 @@ TBZipCompress::~TBZipCompress() { } void TBZipCompress::DoWrite(const void* buf, size_t size) { - if (!Impl_) { + if (!Impl_) { ythrow TBZipCompressError() << "can not write to finished bzip stream"; - } - + } + Impl_->Write(buf, size); } void TBZipCompress::DoFlush() { if (Impl_) { - Impl_->Flush(); - } + Impl_->Flush(); + } } void TBZipCompress::DoFinish() { - THolder<TImpl> impl(Impl_.Release()); - + THolder<TImpl> impl(Impl_.Release()); + if (impl) { - impl->Finish(); - } + impl->Finish(); + } } |