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 | |
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')
-rw-r--r-- | library/cpp/streams/bzip2/bzip2.cpp | 18 | ||||
-rw-r--r-- | library/cpp/streams/lz/lz.cpp | 4 | ||||
-rw-r--r-- | library/cpp/streams/lzma/lzma.cpp | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/streams/bzip2/bzip2.cpp b/library/cpp/streams/bzip2/bzip2.cpp index bccc5c68078..d2c02e3bae4 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(); + } } diff --git a/library/cpp/streams/lz/lz.cpp b/library/cpp/streams/lz/lz.cpp index b65bb3ed965..e743797968a 100644 --- a/library/cpp/streams/lz/lz.cpp +++ b/library/cpp/streams/lz/lz.cpp @@ -41,12 +41,12 @@ public: */ static_assert(sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE, "expect sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE"); Slave_->Write(TCompressor::signature, sizeof(TCompressor::signature) - 1); - + /* * save version */ this->Save((ui32)1); - + /* * save block size */ diff --git a/library/cpp/streams/lzma/lzma.cpp b/library/cpp/streams/lzma/lzma.cpp index f1942fa546e..011b450436c 100644 --- a/library/cpp/streams/lzma/lzma.cpp +++ b/library/cpp/streams/lzma/lzma.cpp @@ -495,10 +495,10 @@ void TLzmaCompress::DoWrite(const void* buf, size_t len) { } void TLzmaCompress::DoFinish() { - THolder<TImpl> impl(Impl_.Release()); - + THolder<TImpl> impl(Impl_.Release()); + if (impl) { - impl->Finish(); + impl->Finish(); } } |