summaryrefslogtreecommitdiffstats
path: root/util/stream/mem.cpp
diff options
context:
space:
mode:
authornikitamorozov <[email protected]>2022-02-10 16:49:20 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:49:20 +0300
commit523d26598d9784601932189f7fceb34d61bf7641 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/stream/mem.cpp
parent2342f2b56e674c21307fcb92a37853f950224d31 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/stream/mem.cpp')
-rw-r--r--util/stream/mem.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/stream/mem.cpp b/util/stream/mem.cpp
index d57a3145fe1..22a3339e274 100644
--- a/util/stream/mem.cpp
+++ b/util/stream/mem.cpp
@@ -38,19 +38,19 @@ void TMemoryInput::DoUndo(size_t len) {
TMemoryOutput::~TMemoryOutput() = default;
-size_t TMemoryOutput::DoNext(void** ptr) {
+size_t TMemoryOutput::DoNext(void** ptr) {
Y_ENSURE(Buf_ < End_, TStringBuf("memory output stream exhausted"));
- *ptr = Buf_;
- size_t bufferSize = End_ - Buf_;
- Buf_ = End_;
-
- return bufferSize;
-}
-
-void TMemoryOutput::DoUndo(size_t len) {
- Buf_ -= len;
-}
-
+ *ptr = Buf_;
+ size_t bufferSize = End_ - Buf_;
+ Buf_ = End_;
+
+ return bufferSize;
+}
+
+void TMemoryOutput::DoUndo(size_t len) {
+ Buf_ -= len;
+}
+
void TMemoryOutput::DoWrite(const void* buf, size_t len) {
char* end = Buf_ + len;
Y_ENSURE(end <= End_, TStringBuf("memory output stream exhausted"));