aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string/format-inl.h
diff options
context:
space:
mode:
authormax42 <max42@yandex-team.ru>2022-02-10 16:47:51 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:51 +0300
commit884333bd8b9068bc6b852b948e9d8f23fd393ab7 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/yt/string/format-inl.h
parent9988f7c537b40605e1a0aaae2977d5f540425b83 (diff)
downloadydb-884333bd8b9068bc6b852b948e9d8f23fd393ab7.tar.gz
Restoring authorship annotation for <max42@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/string/format-inl.h')
-rw-r--r--library/cpp/yt/string/format-inl.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h
index 2e97c60049..5484d4a216 100644
--- a/library/cpp/yt/string/format-inl.h
+++ b/library/cpp/yt/string/format-inl.h
@@ -85,11 +85,11 @@ inline void FormatValue(TStringBuilderBase* builder, TStringBuf value, TStringBu
if (singleQuotes || doubleQuotes) {
for (const char* valueCurrent = value.begin(); valueCurrent < value.end(); ++valueCurrent) {
char ch = *valueCurrent;
- if (ch == '\n') {
- builder->AppendString("\\n");
- } else if (ch == '\t') {
- builder->AppendString("\\t");
- } else if (ch < PrintableASCIILow || ch > PrintableASCIIHigh) {
+ if (ch == '\n') {
+ builder->AppendString("\\n");
+ } else if (ch == '\t') {
+ builder->AppendString("\\t");
+ } else if (ch < PrintableASCIILow || ch > PrintableASCIIHigh) {
builder->AppendString("\\x");
builder->AppendChar(Int2Hex[static_cast<ui8>(ch) >> 4]);
builder->AppendChar(Int2Hex[static_cast<ui8>(ch) & 0xf]);
@@ -288,10 +288,10 @@ struct TValueFormatter<TFormatterWrapper<TFormatter>>
};
// std::vector
-template <class T, class TAllocator>
-struct TValueFormatter<std::vector<T, TAllocator>>
+template <class T, class TAllocator>
+struct TValueFormatter<std::vector<T, TAllocator>>
{
- static void Do(TStringBuilderBase* builder, const std::vector<T, TAllocator>& collection, TStringBuf /*format*/)
+ static void Do(TStringBuilderBase* builder, const std::vector<T, TAllocator>& collection, TStringBuf /*format*/)
{
FormatRange(builder, collection, TDefaultFormatter());
}
@@ -398,20 +398,20 @@ struct TValueFormatter<TEnumIndexedVector<E, T>>
}
};
-// std::pair
-template <class T1, class T2>
-struct TValueFormatter<std::pair<T1, T2>>
-{
- static void Do(TStringBuilderBase* builder, const std::pair<T1, T2>& value, TStringBuf format)
- {
- builder->AppendChar('{');
- FormatValue(builder, value.first, format);
+// std::pair
+template <class T1, class T2>
+struct TValueFormatter<std::pair<T1, T2>>
+{
+ static void Do(TStringBuilderBase* builder, const std::pair<T1, T2>& value, TStringBuf format)
+ {
+ builder->AppendChar('{');
+ FormatValue(builder, value.first, format);
builder->AppendString(TStringBuf(", "));
- FormatValue(builder, value.second, format);
- builder->AppendChar('}');
- }
-};
-
+ FormatValue(builder, value.second, format);
+ builder->AppendChar('}');
+ }
+};
+
// std::optional
inline void FormatValue(TStringBuilderBase* builder, std::nullopt_t, TStringBuf /*format*/)
{