aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.ru>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:53 +0300
commit2a4a975b112fa0fa138abc7457fe67e0e1e7fd02 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/yt/string
parentb91bcef7c99a119b0846479ef71bfab4beec72ca (diff)
downloadydb-2a4a975b112fa0fa138abc7457fe67e0e1e7fd02.tar.gz
Restoring authorship annotation for <ermolovd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/string')
-rw-r--r--library/cpp/yt/string/string_builder-inl.h4
-rw-r--r--library/cpp/yt/string/string_builder.h10
-rw-r--r--library/cpp/yt/string/unittests/format_ut.cpp6
3 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/yt/string/string_builder-inl.h b/library/cpp/yt/string/string_builder-inl.h
index 96b85dadc4..151fcabf7f 100644
--- a/library/cpp/yt/string/string_builder-inl.h
+++ b/library/cpp/yt/string/string_builder-inl.h
@@ -12,7 +12,7 @@ namespace NYT {
inline char* TStringBuilderBase::Preallocate(size_t size)
{
- if (Y_UNLIKELY(End_ - Current_ < static_cast<ssize_t>(size))) {
+ if (Y_UNLIKELY(End_ - Current_ < static_cast<ssize_t>(size))) {
size_t length = GetLength();
auto newLength = std::max(length + size, MinBufferLength);
DoPreallocate(newLength);
@@ -69,7 +69,7 @@ inline void TStringBuilderBase::AppendString(const char* str)
inline void TStringBuilderBase::Reset()
{
- Begin_ = Current_ = End_ = nullptr;
+ Begin_ = Current_ = End_ = nullptr;
DoReset();
}
diff --git a/library/cpp/yt/string/string_builder.h b/library/cpp/yt/string/string_builder.h
index 9b15eb9c5c..0e13e70904 100644
--- a/library/cpp/yt/string/string_builder.h
+++ b/library/cpp/yt/string/string_builder.h
@@ -22,8 +22,8 @@ void Format(TStringBuilderBase* builder, TStringBuf format, TArgs&&... args);
class TStringBuilderBase
{
public:
- virtual ~TStringBuilderBase() = default;
-
+ virtual ~TStringBuilderBase() = default;
+
char* Preallocate(size_t size);
size_t GetLength() const;
@@ -46,9 +46,9 @@ public:
void Reset();
protected:
- char* Begin_ = nullptr;
- char* Current_ = nullptr;
- char* End_ = nullptr;
+ char* Begin_ = nullptr;
+ char* Current_ = nullptr;
+ char* End_ = nullptr;
virtual void DoReset() = 0;
virtual void DoPreallocate(size_t newLength) = 0;
diff --git a/library/cpp/yt/string/unittests/format_ut.cpp b/library/cpp/yt/string/unittests/format_ut.cpp
index c8d30b65b7..ee069bb2c0 100644
--- a/library/cpp/yt/string/unittests/format_ut.cpp
+++ b/library/cpp/yt/string/unittests/format_ut.cpp
@@ -19,9 +19,9 @@ static_assert(TFormatTraits<const char*>::HasCustomFormatValue);
static_assert(TFormatTraits<TStringBuf>::HasCustomFormatValue);
static_assert(TFormatTraits<TString>::HasCustomFormatValue);
static_assert(TFormatTraits<std::vector<int>>::HasCustomFormatValue);
-
-// N.B. TCompactVector<int, 1> is not buildable on Windows
-static_assert(TFormatTraits<TCompactVector<int, 2>>::HasCustomFormatValue);
+
+// N.B. TCompactVector<int, 1> is not buildable on Windows
+static_assert(TFormatTraits<TCompactVector<int, 2>>::HasCustomFormatValue);
static_assert(TFormatTraits<std::set<int>>::HasCustomFormatValue);
static_assert(TFormatTraits<std::map<int, int>>::HasCustomFormatValue);
static_assert(TFormatTraits<std::multimap<int, int>>::HasCustomFormatValue);