aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorglebx777 <glebx777@yandex-team.ru>2022-02-10 16:49:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:44 +0300
commitab9150ae9d81b97b19a2a6a8b903f9a40791c8b4 (patch)
treeff7ea20bcb3779c1ae74319692b5b48686d480cc /util
parent5a8cb97e0064c6b1afe060dc7a4a7c9c0eb879be (diff)
downloadydb-ab9150ae9d81b97b19a2a6a8b903f9a40791c8b4.tar.gz
Restoring authorship annotation for <glebx777@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/generic/array_ref.h8
-rw-r--r--util/generic/yexception.h32
-rw-r--r--util/generic/yexception_ut.cpp36
-rw-r--r--util/stream/fwd.h2
-rw-r--r--util/stream/tempbuf.cpp2
-rw-r--r--util/stream/tempbuf.h10
6 files changed, 45 insertions, 45 deletions
diff --git a/util/generic/array_ref.h b/util/generic/array_ref.h
index 1ac60ac7d3..adecc340db 100644
--- a/util/generic/array_ref.h
+++ b/util/generic/array_ref.h
@@ -273,8 +273,8 @@ template <class T>
constexpr TArrayRef<T> MakeArrayRef(T* data, size_t size) {
return TArrayRef<T>(data, size);
}
-
-template <class T>
+
+template <class T>
constexpr TArrayRef<T> MakeArrayRef(T* begin, T* end) {
- return TArrayRef<T>(begin, end);
-}
+ return TArrayRef<T>(begin, end);
+}
diff --git a/util/generic/yexception.h b/util/generic/yexception.h
index b0c604e8c4..c77cd96db1 100644
--- a/util/generic/yexception.h
+++ b/util/generic/yexception.h
@@ -22,21 +22,21 @@
class TBackTrace;
namespace NPrivateException {
- class TTempBufCuttingWrapperOutput: public IOutputStream {
- public:
- TTempBufCuttingWrapperOutput(TTempBuf& tempbuf)
- : TempBuf_(tempbuf)
- {
- }
-
- void DoWrite(const void* data, size_t len) override {
- TempBuf_.Append(data, Min(len, TempBuf_.Left()));
- }
-
- private:
- TTempBuf& TempBuf_;
- };
-
+ class TTempBufCuttingWrapperOutput: public IOutputStream {
+ public:
+ TTempBufCuttingWrapperOutput(TTempBuf& tempbuf)
+ : TempBuf_(tempbuf)
+ {
+ }
+
+ void DoWrite(const void* data, size_t len) override {
+ TempBuf_.Append(data, Min(len, TempBuf_.Left()));
+ }
+
+ private:
+ TTempBuf& TempBuf_;
+ };
+
class yexception: public std::exception {
public:
yexception();
@@ -51,7 +51,7 @@ namespace NPrivateException {
template <class T>
inline void Append(const T& t) {
- TTempBufCuttingWrapperOutput tempBuf(Buf_);
+ TTempBufCuttingWrapperOutput tempBuf(Buf_);
static_cast<IOutputStream&>(tempBuf) << t;
ZeroTerminate();
}
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp
index cb3e29fed8..a724c7dcdb 100644
--- a/util/generic/yexception_ut.cpp
+++ b/util/generic/yexception_ut.cpp
@@ -11,8 +11,8 @@ static inline void Throw2DontMove() {
#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/algorithm.h>
-#include <util/memory/tempbuf.h>
-#include <util/random/mersenne.h>
+#include <util/memory/tempbuf.h>
+#include <util/random/mersenne.h>
#include <util/stream/output.h>
#include <util/string/subst.h>
@@ -50,7 +50,7 @@ class TExceptionTest: public TTestBase {
UNIT_TEST(TestEnsureWithBackTrace2)
UNIT_TEST(TestRethrowAppend)
UNIT_TEST(TestMacroOverload)
- UNIT_TEST(TestMessageCrop)
+ UNIT_TEST(TestMessageCrop)
UNIT_TEST(TestTIoSystemErrorSpecialMethods)
UNIT_TEST(TestCurrentExceptionTypeNameMethod)
UNIT_TEST_SUITE_END();
@@ -280,22 +280,22 @@ private:
UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20"));
}
}
-
- void TestMessageCrop() {
- TTempBuf tmp;
- size_t size = tmp.Size() * 1.5;
- TString s;
- s.reserve(size);
- TMersenne<ui64> generator(42);
- for (int j = 0; j < 50; ++j) {
- for (size_t i = 0; i < size; ++i) {
- s += static_cast<char>('a' + generator() % 26);
- }
- yexception e;
- e << s;
+
+ void TestMessageCrop() {
+ TTempBuf tmp;
+ size_t size = tmp.Size() * 1.5;
+ TString s;
+ s.reserve(size);
+ TMersenne<ui64> generator(42);
+ for (int j = 0; j < 50; ++j) {
+ for (size_t i = 0; i < size; ++i) {
+ s += static_cast<char>('a' + generator() % 26);
+ }
+ yexception e;
+ e << s;
UNIT_ASSERT_EQUAL(e.AsStrBuf(), s.substr(0, tmp.Size() - 1));
- }
- }
+ }
+ }
void TestTIoSystemErrorSpecialMethods() {
TString testStr{"systemError"};
diff --git a/util/stream/fwd.h b/util/stream/fwd.h
index 307676c6a7..ba3d8acd06 100644
--- a/util/stream/fwd.h
+++ b/util/stream/fwd.h
@@ -38,7 +38,7 @@ class TStringStream;
class TTeeOutput;
-class TTempBufOutput;
+class TTempBufOutput;
struct TEol;
diff --git a/util/stream/tempbuf.cpp b/util/stream/tempbuf.cpp
index 801a1fabb0..3529953687 100644
--- a/util/stream/tempbuf.cpp
+++ b/util/stream/tempbuf.cpp
@@ -6,7 +6,7 @@ namespace {
}
}
-void TTempBufOutput::DoWrite(const void* data, size_t len) {
+void TTempBufOutput::DoWrite(const void* data, size_t len) {
if (Y_LIKELY(len <= Left())) {
Append(data, len);
} else {
diff --git a/util/stream/tempbuf.h b/util/stream/tempbuf.h
index a6dc001025..3020db3a2b 100644
--- a/util/stream/tempbuf.h
+++ b/util/stream/tempbuf.h
@@ -4,17 +4,17 @@
#include <util/memory/tempbuf.h>
-class TTempBufOutput: public IOutputStream, public TTempBuf {
+class TTempBufOutput: public IOutputStream, public TTempBuf {
public:
- inline TTempBufOutput() = default;
+ inline TTempBufOutput() = default;
- explicit TTempBufOutput(size_t size)
+ explicit TTempBufOutput(size_t size)
: TTempBuf(size)
{
}
- TTempBufOutput(TTempBufOutput&&) noexcept = default;
- TTempBufOutput& operator=(TTempBufOutput&&) noexcept = default;
+ TTempBufOutput(TTempBufOutput&&) noexcept = default;
+ TTempBufOutput& operator=(TTempBufOutput&&) noexcept = default;
protected:
void DoWrite(const void* data, size_t len) override;