aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/buffered.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/stream/buffered.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/stream/buffered.cpp')
-rw-r--r--util/stream/buffered.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/util/stream/buffered.cpp b/util/stream/buffered.cpp
index a00e592e1c..230b743688 100644
--- a/util/stream/buffered.cpp
+++ b/util/stream/buffered.cpp
@@ -7,9 +7,9 @@
class TBufferedInput::TImpl: public TAdditionalStorage<TImpl> {
public:
- inline TImpl(IInputStream* slave)
+ inline TImpl(IInputStream* slave)
: Slave_(slave)
- , MemInput_(nullptr, 0)
+ , MemInput_(nullptr, 0)
{
}
@@ -99,7 +99,7 @@ public:
return ret;
}
- inline void Reset(IInputStream* slave) {
+ inline void Reset(IInputStream* slave) {
Slave_ = slave;
}
@@ -113,11 +113,11 @@ private:
}
private:
- IInputStream* Slave_;
+ IInputStream* Slave_;
TMemoryInput MemInput_;
};
-TBufferedInput::TBufferedInput(IInputStream* slave, size_t buflen)
+TBufferedInput::TBufferedInput(IInputStream* slave, size_t buflen)
: Impl_(new (buflen) TImpl(slave))
{
}
@@ -143,13 +143,13 @@ size_t TBufferedInput::DoReadTo(TString& st, char ch) {
return Impl_->ReadTo(st, ch);
}
-void TBufferedInput::Reset(IInputStream* slave) {
+void TBufferedInput::Reset(IInputStream* slave) {
Impl_->Reset(slave);
}
class TBufferedOutputBase::TImpl {
public:
- inline TImpl(IOutputStream* slave)
+ inline TImpl(IOutputStream* slave)
: Slave_(slave)
, MemOut_(nullptr, 0)
, PropagateFlush_(false)
@@ -191,7 +191,7 @@ public:
const size_t good_len = DownToBufferGranularity(full_len);
const size_t write_from_buf = good_len - stored;
- using TPart = IOutputStream::TPart;
+ using TPart = IOutputStream::TPart;
alignas(TPart) char data[2 * sizeof(TPart)];
TPart* parts = reinterpret_cast<TPart*>(data);
@@ -282,7 +282,7 @@ private:
virtual size_t Len() const noexcept = 0;
private:
- IOutputStream* Slave_;
+ IOutputStream* Slave_;
TMemoryOutput MemOut_;
bool PropagateFlush_;
bool PropagateFinish_;
@@ -290,7 +290,7 @@ private:
namespace {
struct TSimpleImpl: public TBufferedOutputBase::TImpl, public TAdditionalStorage<TSimpleImpl> {
- inline TSimpleImpl(IOutputStream* slave)
+ inline TSimpleImpl(IOutputStream* slave)
: TBufferedOutputBase::TImpl(slave)
{
Reset();
@@ -315,7 +315,7 @@ namespace {
Step = 4096
};
- inline TAdaptiveImpl(IOutputStream* slave)
+ inline TAdaptiveImpl(IOutputStream* slave)
: TBufferedOutputBase::TImpl(slave)
, N_(0)
{
@@ -346,12 +346,12 @@ namespace {
};
}
-TBufferedOutputBase::TBufferedOutputBase(IOutputStream* slave)
+TBufferedOutputBase::TBufferedOutputBase(IOutputStream* slave)
: Impl_(new TAdaptiveImpl(slave))
{
}
-TBufferedOutputBase::TBufferedOutputBase(IOutputStream* slave, size_t buflen)
+TBufferedOutputBase::TBufferedOutputBase(IOutputStream* slave, size_t buflen)
: Impl_(new (buflen) TSimpleImpl(slave))
{
}
@@ -413,14 +413,14 @@ void TBufferedOutputBase::SetFinishPropagateMode(bool propagate) noexcept {
}
}
-TBufferedOutput::TBufferedOutput(IOutputStream* slave, size_t buflen)
+TBufferedOutput::TBufferedOutput(IOutputStream* slave, size_t buflen)
: TBufferedOutputBase(slave, buflen)
{
}
TBufferedOutput::~TBufferedOutput() = default;
-TAdaptiveBufferedOutput::TAdaptiveBufferedOutput(IOutputStream* slave)
+TAdaptiveBufferedOutput::TAdaptiveBufferedOutput(IOutputStream* slave)
: TBufferedOutputBase(slave)
{
}