diff options
author | denplusplus <denplusplus@yandex-team.ru> | 2022-02-10 16:47:34 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:34 +0300 |
commit | addb3626ed629a8c7d9c8c30e87365b478a8c266 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/stream | |
parent | 57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (diff) | |
download | ydb-addb3626ed629a8c7d9c8c30e87365b478a8c266.tar.gz |
Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/stream')
-rw-r--r-- | util/stream/buffer.cpp | 22 | ||||
-rw-r--r-- | util/stream/buffer.h | 4 | ||||
-rw-r--r-- | util/stream/file.cpp | 2 | ||||
-rw-r--r-- | util/stream/file.h | 8 | ||||
-rw-r--r-- | util/stream/ios_ut.cpp | 18 |
5 files changed, 27 insertions, 27 deletions
diff --git a/util/stream/buffer.cpp b/util/stream/buffer.cpp index a5d5e75b48..2facece4ea 100644 --- a/util/stream/buffer.cpp +++ b/util/stream/buffer.cpp @@ -41,8 +41,8 @@ public: private: TBuffer& Data_; static constexpr size_t MinBufferGrowSize = 16; -}; - +}; + namespace { using TImpl = TBufferOutput::TImpl; @@ -58,14 +58,14 @@ namespace { TBufferOutput::TBufferOutput(size_t buflen) : Impl_(new TOwnedImpl(buflen)) -{ -} - +{ +} + TBufferOutput::TBufferOutput(TBuffer& buffer) : Impl_(new TImpl(buffer)) { -} - +} + TBufferOutput::TBufferOutput(TBufferOutput&&) noexcept = default; TBufferOutput& TBufferOutput::operator=(TBufferOutput&&) noexcept = default; @@ -85,8 +85,8 @@ void TBufferOutput::DoUndo(size_t len) { void TBufferOutput::DoWrite(const void* buf, size_t len) { Impl_->DoWrite(buf, len); -} - +} + void TBufferOutput::DoWriteC(char c) { Impl_->DoWriteC(c); } @@ -95,8 +95,8 @@ TBufferInput::TBufferInput(const TBuffer& buffer) : Buf_(buffer) , Readed_(0) { -} - +} + TBufferInput::~TBufferInput() = default; const TBuffer& TBufferInput::Buffer() const noexcept { diff --git a/util/stream/buffer.h b/util/stream/buffer.h index 5932d54c5d..9dc99dbe49 100644 --- a/util/stream/buffer.h +++ b/util/stream/buffer.h @@ -53,8 +53,8 @@ private: private: THolder<TImpl> Impl_; -}; - +}; + /** * Input stream that reads from an external `TBuffer`. */ diff --git a/util/stream/file.cpp b/util/stream/file.cpp index 35fd925612..dc5d2f6311 100644 --- a/util/stream/file.cpp +++ b/util/stream/file.cpp @@ -69,7 +69,7 @@ void TUnbufferedFileOutput::DoFlush() { File_.Flush(); } } - + class TMappedFileInput::TImpl: public TBlob { public: inline TImpl(TFile file) diff --git a/util/stream/file.h b/util/stream/file.h index 3975aacf0a..c1cf4f591d 100644 --- a/util/stream/file.h +++ b/util/stream/file.h @@ -84,8 +84,8 @@ public: } ~TFileInput() override = default; -}; - +}; + /** * Buffered file output stream. * @@ -103,6 +103,6 @@ public: } ~TFixedBufferFileOutput() override = default; -}; - +}; + /** @} */ diff --git a/util/stream/ios_ut.cpp b/util/stream/ios_ut.cpp index 307470e196..139f4296e5 100644 --- a/util/stream/ios_ut.cpp +++ b/util/stream/ios_ut.cpp @@ -254,30 +254,30 @@ void TStreamsTest::TestBufferedIO() { bo.Finish(); } } - + void TStreamsTest::TestBufferStream() { - TBufferStream stream; + TBufferStream stream; TString s = "test"; stream.Write(s.data(), s.size()); - char buf[5]; + char buf[5]; size_t bytesRead = stream.Read(buf, 4); UNIT_ASSERT_EQUAL(4, bytesRead); UNIT_ASSERT_EQUAL(0, strncmp(s.data(), buf, 4)); - + stream.Write(s.data(), s.size()); bytesRead = stream.Read(buf, 2); UNIT_ASSERT_EQUAL(2, bytesRead); - UNIT_ASSERT_EQUAL(0, strncmp("te", buf, 2)); + UNIT_ASSERT_EQUAL(0, strncmp("te", buf, 2)); bytesRead = stream.Read(buf, 2); UNIT_ASSERT_EQUAL(2, bytesRead); - UNIT_ASSERT_EQUAL(0, strncmp("st", buf, 2)); - + UNIT_ASSERT_EQUAL(0, strncmp("st", buf, 2)); + bytesRead = stream.Read(buf, 2); UNIT_ASSERT_EQUAL(0, bytesRead); -} - +} + namespace { class TStringListInput: public IWalkInput { public: |