aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream
diff options
context:
space:
mode:
authorsmalov <smalov@yandex-team.ru>2022-02-10 16:47:36 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:36 +0300
commitcfadda92ca195da3ad68d721a58872a4f1ced696 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /util/stream
parentf70d9720e13aef3a935e3f405b0eac554529e76e (diff)
downloadydb-cfadda92ca195da3ad68d721a58872a4f1ced696.tar.gz
Restoring authorship annotation for <smalov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/stream')
-rw-r--r--util/stream/input.cpp4
-rw-r--r--util/stream/ios_ut.cpp62
-rw-r--r--util/stream/output.cpp4
-rw-r--r--util/stream/output.h16
-rw-r--r--util/stream/zlib.cpp2
5 files changed, 44 insertions, 44 deletions
diff --git a/util/stream/input.cpp b/util/stream/input.cpp
index 9361be259e..6e8170f2f9 100644
--- a/util/stream/input.cpp
+++ b/util/stream/input.cpp
@@ -97,8 +97,8 @@ size_t IInputStream::ReadLine(TUtf16String& w) {
}
return result;
-}
-
+}
+
TString IInputStream::ReadLine() {
TString ret;
diff --git a/util/stream/ios_ut.cpp b/util/stream/ios_ut.cpp
index 10f337b3cf..139f4296e5 100644
--- a/util/stream/ios_ut.cpp
+++ b/util/stream/ios_ut.cpp
@@ -7,7 +7,7 @@
#include <library/cpp/testing/unittest/registar.h>
#include <util/string/cast.h>
-#include <util/memory/tempbuf.h>
+#include <util/memory/tempbuf.h>
#include <util/charset/wide.h>
#include <string>
@@ -278,7 +278,7 @@ void TStreamsTest::TestBufferStream() {
UNIT_ASSERT_EQUAL(0, bytesRead);
}
-namespace {
+namespace {
class TStringListInput: public IWalkInput {
public:
TStringListInput(const TVector<TString>& data)
@@ -305,27 +305,27 @@ namespace {
};
const char Text[] =
- // UTF8 encoded "one \ntwo\r\nthree\n\tfour\nfive\n" in russian and ...
+ // UTF8 encoded "one \ntwo\r\nthree\n\tfour\nfive\n" in russian and ...
"один \n"
"два\r\n"
"три\n"
"\tчетыре\n"
"пять\n"
- // ... additional test cases
+ // ... additional test cases
"\r\n"
"\n\r" // this char goes to the front of the next string
"one two\n"
"123\r\n"
"\t\r ";
-
+
const char* Expected[] = {
- // UTF8 encoded "one ", "two", "three", "\tfour", "five" in russian and ...
+ // UTF8 encoded "one ", "two", "three", "\tfour", "five" in russian and ...
"один ",
"два",
"три",
"\tчетыре",
"пять",
- // ... additional test cases
+ // ... additional test cases
"",
"",
"\rone two",
@@ -394,8 +394,8 @@ namespace {
TStringListInput sli(lst);
test(sli, "IWalkInput");
}
-}
-
+}
+
void TStreamsTest::TestReadTo() {
TestStreamReadTo("111a222b333c444d555e666f", TestStreamReadTo1);
TestStreamReadTo(Text, TestStreamReadTo2);
@@ -415,41 +415,41 @@ void TStreamsTest::TestStrokaInput() {
TestStreamReadTo(s, ::TestStrokaInput);
}
-void TStreamsTest::TestWtrokaInput() {
+void TStreamsTest::TestWtrokaInput() {
const TString s(Text);
- TStringInput is(s);
+ TStringInput is(s);
TUtf16String w;
size_t i = 0;
-
- while (is.ReadLine(w)) {
+
+ while (is.ReadLine(w)) {
UNIT_ASSERT(i < Y_ARRAY_SIZE(Expected));
UNIT_ASSERT_VALUES_EQUAL(w, UTF8ToWide(Expected[i]));
-
- ++i;
- }
-}
-
-void TStreamsTest::TestWtrokaOutput() {
+
+ ++i;
+ }
+}
+
+void TStreamsTest::TestWtrokaOutput() {
TString s;
- TStringOutput os(s);
- const size_t n = sizeof(Expected) / sizeof(Expected[0]);
-
- for (size_t i = 0; i < n; ++i) {
+ TStringOutput os(s);
+ const size_t n = sizeof(Expected) / sizeof(Expected[0]);
+
+ for (size_t i = 0; i < n; ++i) {
TUtf16String w = UTF8ToWide(Expected[i]);
-
- os << w;
+
+ os << w;
if (i == 1 || i == 5 || i == 8) {
- os << '\r';
+ os << '\r';
}
if (i < n - 1) {
- os << '\n';
+ os << '\n';
}
- }
-
- UNIT_ASSERT(s == Text);
-}
+ }
+
+ UNIT_ASSERT(s == Text);
+}
void TStreamsTest::TestWchar16Output() {
TString s;
diff --git a/util/stream/output.cpp b/util/stream/output.cpp
index 195e4cfdb2..db81b81b70 100644
--- a/util/stream/output.cpp
+++ b/util/stream/output.cpp
@@ -136,8 +136,8 @@ void Out<const wchar16*>(IOutputStream& o, const wchar16* w) {
} else {
o.Write("(null)");
}
-}
-
+}
+
template <>
void Out<const wchar32*>(IOutputStream& o, const wchar32* w) {
if (w) {
diff --git a/util/stream/output.h b/util/stream/output.h
index 8190c09707..00eef50b95 100644
--- a/util/stream/output.h
+++ b/util/stream/output.h
@@ -240,15 +240,15 @@ static inline std::enable_if_t<!std::is_scalar<T>::value, IOutputStream&> operat
}
static inline IOutputStream& operator<<(IOutputStream& o, const wchar16* t) {
- Out<const wchar16*>(o, t);
- return o;
-}
-
+ Out<const wchar16*>(o, t);
+ return o;
+}
+
static inline IOutputStream& operator<<(IOutputStream& o, wchar16* t) {
- Out<const wchar16*>(o, t);
- return o;
-}
-
+ Out<const wchar16*>(o, t);
+ return o;
+}
+
static inline IOutputStream& operator<<(IOutputStream& o, const wchar32* t) {
Out<const wchar32*>(o, t);
return o;
diff --git a/util/stream/zlib.cpp b/util/stream/zlib.cpp
index 4dbef9839e..60f4e9439f 100644
--- a/util/stream/zlib.cpp
+++ b/util/stream/zlib.cpp
@@ -204,7 +204,7 @@ public:
inline TImpl(const TParams& p)
: Stream_(p.Out)
{
- if (deflateInit2(Z(), Min<size_t>(9, p.CompressionLevel), Z_DEFLATED, opts[Type(p.Type)], 8, Z_DEFAULT_STRATEGY)) {
+ if (deflateInit2(Z(), Min<size_t>(9, p.CompressionLevel), Z_DEFLATED, opts[Type(p.Type)], 8, Z_DEFAULT_STRATEGY)) {
ythrow TZLibCompressorError() << "can not init inflate engine";
}