aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /library/cpp
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/util/recentwnd.h2
-rw-r--r--library/cpp/balloc/balloc.cpp8
-rw-r--r--library/cpp/charset/iconv.cpp2
-rw-r--r--library/cpp/codecs/ya.make2
-rw-r--r--library/cpp/containers/flat_hash/lib/map.h12
-rw-r--r--library/cpp/containers/flat_hash/lib/set.h12
-rw-r--r--library/cpp/json/writer/json.h70
-rw-r--r--library/cpp/logger/rotating_file_ut.cpp26
-rw-r--r--library/cpp/lwtrace/log.h2
-rw-r--r--library/cpp/malloc/ya.make8
-rw-r--r--library/cpp/monlib/encode/spack/compression.cpp4
-rw-r--r--library/cpp/monlib/encode/spack/ya.make2
-rw-r--r--library/cpp/monlib/metrics/metric_value.h2
-rw-r--r--library/cpp/openssl/init/ya.make2
-rw-r--r--library/cpp/protobuf/json/json2proto.cpp14
-rw-r--r--library/cpp/protobuf/json/proto2json_printer.cpp14
-rw-r--r--library/cpp/protobuf/json/ut/json.h8
-rw-r--r--library/cpp/protobuf/json/ut/test.proto8
-rw-r--r--library/cpp/resource/registry.cpp26
-rw-r--r--library/cpp/scheme/tests/ut/scheme_ut.cpp2
-rw-r--r--library/cpp/streams/bzip2/bzip2.cpp16
-rw-r--r--library/cpp/streams/lz/lz.cpp2
-rw-r--r--library/cpp/timezone_conversion/civil.h4
-rw-r--r--library/cpp/timezone_conversion/convert.cpp2
-rw-r--r--library/cpp/timezone_conversion/convert.h2
-rw-r--r--library/cpp/tld/ya.make2
-rw-r--r--library/cpp/uri/parsefsm.rl68
-rw-r--r--library/cpp/yson/node/node.h4
-rw-r--r--library/cpp/yson/node/node_ut.cpp8
29 files changed, 137 insertions, 137 deletions
diff --git a/library/cpp/actors/util/recentwnd.h b/library/cpp/actors/util/recentwnd.h
index fe52a3bfe6..ba1ede6f29 100644
--- a/library/cpp/actors/util/recentwnd.h
+++ b/library/cpp/actors/util/recentwnd.h
@@ -63,5 +63,5 @@ public:
private:
TContainer<TElem> Window_;
- ui32 MaxWndSize_;
+ ui32 MaxWndSize_;
};
diff --git a/library/cpp/balloc/balloc.cpp b/library/cpp/balloc/balloc.cpp
index c5766a19f8..fab489db4c 100644
--- a/library/cpp/balloc/balloc.cpp
+++ b/library/cpp/balloc/balloc.cpp
@@ -296,10 +296,10 @@ extern "C" void* memalign(size_t alignment, size_t size) {
return res ? nullptr : ptr;
}
-extern "C" void* valloc(size_t size) {
- return memalign(NBalloc::PAGE_ELEM, size);
-}
-
+extern "C" void* valloc(size_t size) {
+ return memalign(NBalloc::PAGE_ELEM, size);
+}
+
#if !defined(_MSC_VER) && !defined(_freebsd_)
// Workaround for pthread_create bug in linux.
extern "C" void* __libc_memalign(size_t alignment, size_t size) {
diff --git a/library/cpp/charset/iconv.cpp b/library/cpp/charset/iconv.cpp
index 3651f3682c..df43471470 100644
--- a/library/cpp/charset/iconv.cpp
+++ b/library/cpp/charset/iconv.cpp
@@ -27,7 +27,7 @@ size_t NICONVPrivate::RecodeImpl(const TDescriptor& descriptor, const char* in,
Y_ASSERT(in);
Y_ASSERT(out);
- char* inPtr = const_cast<char*>(in);
+ char* inPtr = const_cast<char*>(in);
char* outPtr = out;
size_t inSizeMod = inSize;
size_t outSizeMod = outSize;
diff --git a/library/cpp/codecs/ya.make b/library/cpp/codecs/ya.make
index 11d36ae67b..7e76fb0c9a 100644
--- a/library/cpp/codecs/ya.make
+++ b/library/cpp/codecs/ya.make
@@ -19,7 +19,7 @@ SRCS(
)
PEERDIR(
- contrib/libs/zstd
+ contrib/libs/zstd
library/cpp/bit_io
library/cpp/blockcodecs
library/cpp/codecs/greedy_dict
diff --git a/library/cpp/containers/flat_hash/lib/map.h b/library/cpp/containers/flat_hash/lib/map.h
index b7f5c4b9b5..f77c318a61 100644
--- a/library/cpp/containers/flat_hash/lib/map.h
+++ b/library/cpp/containers/flat_hash/lib/map.h
@@ -96,12 +96,12 @@ public:
insert(il.begin(), il.end());
}
- TMap(std::initializer_list<value_type> il, size_type initSize = INIT_SIZE)
- : TBase(initSize)
- {
- insert(il.begin(), il.end());
- }
-
+ TMap(std::initializer_list<value_type> il, size_type initSize = INIT_SIZE)
+ : TBase(initSize)
+ {
+ insert(il.begin(), il.end());
+ }
+
TMap(const TMap&) = default;
TMap(TMap&&) = default;
diff --git a/library/cpp/containers/flat_hash/lib/set.h b/library/cpp/containers/flat_hash/lib/set.h
index f6ae678068..5266293c6c 100644
--- a/library/cpp/containers/flat_hash/lib/set.h
+++ b/library/cpp/containers/flat_hash/lib/set.h
@@ -87,12 +87,12 @@ public:
insert(il.begin(), il.end());
}
- TSet(std::initializer_list<value_type> il, size_type initSize = INIT_SIZE)
- : TBase(initSize)
- {
- insert(il.begin(), il.end());
- }
-
+ TSet(std::initializer_list<value_type> il, size_type initSize = INIT_SIZE)
+ : TBase(initSize)
+ {
+ insert(il.begin(), il.end());
+ }
+
TSet(const TSet&) = default;
TSet(TSet&&) = default;
diff --git a/library/cpp/json/writer/json.h b/library/cpp/json/writer/json.h
index 95c3aefb10..0aae2531b9 100644
--- a/library/cpp/json/writer/json.h
+++ b/library/cpp/json/writer/json.h
@@ -163,19 +163,19 @@ namespace NJsonWriter {
template <typename TOutContext>
class TValueWriter {
public:
- TOutContext WriteNull();
- TOutContext WriteString(const TStringBuf&);
- TOutContext WriteString(const TStringBuf& s, EHtmlEscapeMode hem);
- TOutContext WriteInt(int);
- TOutContext WriteLongLong(long long);
- TOutContext WriteULongLong(unsigned long long);
- TOutContext WriteBool(bool);
- TOutContext WriteFloat(float);
- TOutContext WriteFloat(float, EFloatToStringMode, int ndigits);
- TOutContext WriteDouble(double);
- TOutContext WriteDouble(double, EFloatToStringMode, int ndigits);
- TOutContext WriteJsonValue(const NJson::TJsonValue* value, bool sortKeys = false);
- TOutContext UnsafeWriteValue(const TStringBuf&);
+ TOutContext WriteNull();
+ TOutContext WriteString(const TStringBuf&);
+ TOutContext WriteString(const TStringBuf& s, EHtmlEscapeMode hem);
+ TOutContext WriteInt(int);
+ TOutContext WriteLongLong(long long);
+ TOutContext WriteULongLong(unsigned long long);
+ TOutContext WriteBool(bool);
+ TOutContext WriteFloat(float);
+ TOutContext WriteFloat(float, EFloatToStringMode, int ndigits);
+ TOutContext WriteDouble(double);
+ TOutContext WriteDouble(double, EFloatToStringMode, int ndigits);
+ TOutContext WriteJsonValue(const NJson::TJsonValue* value, bool sortKeys = false);
+ TOutContext UnsafeWriteValue(const TStringBuf&);
TValueContext BeginList();
TPairContext BeginObject();
@@ -253,28 +253,28 @@ namespace NJsonWriter {
TBuf& Buf;
};
-#define JSON_VALUE_WRITER_WRAP(function, params, args) \
- template <typename TOutContext> \
- TOutContext TValueWriter<TOutContext>::function params { \
- Buf.function args; \
- return TOutContext(Buf); \
- }
-
- JSON_VALUE_WRITER_WRAP(WriteNull, (), ())
- JSON_VALUE_WRITER_WRAP(WriteString, (const TStringBuf& arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteString, (const TStringBuf& s, EHtmlEscapeMode hem), (s, hem))
- JSON_VALUE_WRITER_WRAP(WriteInt, (int arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteLongLong, (long long arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteULongLong, (unsigned long long arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteBool, (bool arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteFloat, (float arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteFloat, (float arg, EFloatToStringMode mode, int ndigits), (arg, mode, ndigits))
- JSON_VALUE_WRITER_WRAP(WriteDouble, (double arg), (arg))
- JSON_VALUE_WRITER_WRAP(WriteDouble, (double arg, EFloatToStringMode mode, int ndigits), (arg, mode, ndigits))
- JSON_VALUE_WRITER_WRAP(WriteJsonValue, (const NJson::TJsonValue* value, bool sortKeys), (value, sortKeys))
- JSON_VALUE_WRITER_WRAP(UnsafeWriteValue, (const TStringBuf& arg), (arg))
-#undef JSON_VALUE_WRITER_WRAP
-
+#define JSON_VALUE_WRITER_WRAP(function, params, args) \
+ template <typename TOutContext> \
+ TOutContext TValueWriter<TOutContext>::function params { \
+ Buf.function args; \
+ return TOutContext(Buf); \
+ }
+
+ JSON_VALUE_WRITER_WRAP(WriteNull, (), ())
+ JSON_VALUE_WRITER_WRAP(WriteString, (const TStringBuf& arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteString, (const TStringBuf& s, EHtmlEscapeMode hem), (s, hem))
+ JSON_VALUE_WRITER_WRAP(WriteInt, (int arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteLongLong, (long long arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteULongLong, (unsigned long long arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteBool, (bool arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteFloat, (float arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteFloat, (float arg, EFloatToStringMode mode, int ndigits), (arg, mode, ndigits))
+ JSON_VALUE_WRITER_WRAP(WriteDouble, (double arg), (arg))
+ JSON_VALUE_WRITER_WRAP(WriteDouble, (double arg, EFloatToStringMode mode, int ndigits), (arg, mode, ndigits))
+ JSON_VALUE_WRITER_WRAP(WriteJsonValue, (const NJson::TJsonValue* value, bool sortKeys), (value, sortKeys))
+ JSON_VALUE_WRITER_WRAP(UnsafeWriteValue, (const TStringBuf& arg), (arg))
+#undef JSON_VALUE_WRITER_WRAP
+
template <typename TOutContext>
TValueContext TValueWriter<TOutContext>::BeginList() {
return Buf.BeginList();
diff --git a/library/cpp/logger/rotating_file_ut.cpp b/library/cpp/logger/rotating_file_ut.cpp
index 05770ead4b..84966933d9 100644
--- a/library/cpp/logger/rotating_file_ut.cpp
+++ b/library/cpp/logger/rotating_file_ut.cpp
@@ -40,18 +40,18 @@ Y_UNIT_TEST_SUITE(NewRotatingFileSuite) {
TStringBuilder data;
for (size_t i = 0; i < 10; ++i)
data << "data\n";
- log.WriteData(TLogRecord(ELogPriority::TLOG_INFO, data.data(), data.size()));
- UNIT_ASSERT_C(TFileStat(PATH).Size > 0, "file " << PATH << " has zero size");
- log.WriteData(TLogRecord(ELogPriority::TLOG_INFO, data.data(), data.size()));
- UNIT_ASSERT_C(TFileStat(PATH).Size > 0, "file " << PATH << " has zero size");
- UNIT_ASSERT_C(TFileStat(TStringBuilder{} << PATH << ".1").Size > 0, "file " << PATH << ".1 has zero size");
- UNIT_ASSERT_C(TFileStat(PATH).Size > maxSize, "size of file " << PATH << " is lesser than was written");
- data.clear();
- data << "more data";
- log.WriteData(TLogRecord(ELogPriority::TLOG_INFO, data.data(), data.size()));
- UNIT_ASSERT_C(TFileStat(PATH).Size > 0, "file " << PATH << " has zero size");
- UNIT_ASSERT_C(TFileStat(TStringBuilder{} << PATH << ".1").Size > 0, "file " << PATH << ".1 has zero size");
- UNIT_ASSERT_C(TFileStat(TStringBuilder{} << PATH << ".2").Size > 0, "file " << PATH << ".2 has zero size");
- UNIT_ASSERT_C(TFileStat(PATH).Size < maxSize, "size of file " << PATH << " is greater than the size limit of " << maxSize << " bytes");
+ log.WriteData(TLogRecord(ELogPriority::TLOG_INFO, data.data(), data.size()));
+ UNIT_ASSERT_C(TFileStat(PATH).Size > 0, "file " << PATH << " has zero size");
+ log.WriteData(TLogRecord(ELogPriority::TLOG_INFO, data.data(), data.size()));
+ UNIT_ASSERT_C(TFileStat(PATH).Size > 0, "file " << PATH << " has zero size");
+ UNIT_ASSERT_C(TFileStat(TStringBuilder{} << PATH << ".1").Size > 0, "file " << PATH << ".1 has zero size");
+ UNIT_ASSERT_C(TFileStat(PATH).Size > maxSize, "size of file " << PATH << " is lesser than was written");
+ data.clear();
+ data << "more data";
+ log.WriteData(TLogRecord(ELogPriority::TLOG_INFO, data.data(), data.size()));
+ UNIT_ASSERT_C(TFileStat(PATH).Size > 0, "file " << PATH << " has zero size");
+ UNIT_ASSERT_C(TFileStat(TStringBuilder{} << PATH << ".1").Size > 0, "file " << PATH << ".1 has zero size");
+ UNIT_ASSERT_C(TFileStat(TStringBuilder{} << PATH << ".2").Size > 0, "file " << PATH << ".2 has zero size");
+ UNIT_ASSERT_C(TFileStat(PATH).Size < maxSize, "size of file " << PATH << " is greater than the size limit of " << maxSize << " bytes");
}
}
diff --git a/library/cpp/lwtrace/log.h b/library/cpp/lwtrace/log.h
index 9bf3aa7d24..56981a97f8 100644
--- a/library/cpp/lwtrace/log.h
+++ b/library/cpp/lwtrace/log.h
@@ -276,7 +276,7 @@ namespace NLWTrace {
struct TItem : TLogItem {
TThread::TId ThreadId;
- TItem() = default;
+ TItem() = default;
TItem(TThread::TId tid, const TLogItem& item)
: TLogItem(item)
diff --git a/library/cpp/malloc/ya.make b/library/cpp/malloc/ya.make
index fe0c439002..0ec9db71d2 100644
--- a/library/cpp/malloc/ya.make
+++ b/library/cpp/malloc/ya.make
@@ -5,7 +5,7 @@ RECURSE(
tcmalloc
galloc
jemalloc
- lockless
+ lockless
nalf
sample-client
system
@@ -15,10 +15,10 @@ RECURSE(
hu/link_test
)
-IF (NOT OS_WINDOWS)
+IF (NOT OS_WINDOWS)
RECURSE(
- calloc
- calloc/tests
+ calloc
+ calloc/tests
calloc/calloc_profile_diff
calloc/calloc_profile_scan
calloc/calloc_profile_scan/ut
diff --git a/library/cpp/monlib/encode/spack/compression.cpp b/library/cpp/monlib/encode/spack/compression.cpp
index 6de23dbb08..0d2152fc85 100644
--- a/library/cpp/monlib/encode/spack/compression.cpp
+++ b/library/cpp/monlib/encode/spack/compression.cpp
@@ -10,7 +10,7 @@
#include <util/stream/walk.h>
#include <contrib/libs/lz4/lz4.h>
-#include <contrib/libs/xxhash/xxhash.h>
+#include <contrib/libs/xxhash/xxhash.h>
#include <contrib/libs/zlib/zlib.h>
#define ZSTD_STATIC_LINKING_ONLY
#include <contrib/libs/zstd/include/zstd.h>
@@ -60,7 +60,7 @@ namespace NMonitoring {
struct TXxHash32 {
static TCheckSum Calc(TBlock in) {
static const ui32 SEED = 0x1337c0de;
- return XXH32(in.data(), in.size(), SEED);
+ return XXH32(in.data(), in.size(), SEED);
}
static bool Check(TBlock in, TCheckSum checksum) {
diff --git a/library/cpp/monlib/encode/spack/ya.make b/library/cpp/monlib/encode/spack/ya.make
index 71d4169b0d..78d3061291 100644
--- a/library/cpp/monlib/encode/spack/ya.make
+++ b/library/cpp/monlib/encode/spack/ya.make
@@ -17,7 +17,7 @@ PEERDIR(
library/cpp/monlib/exception
contrib/libs/lz4
- contrib/libs/xxhash
+ contrib/libs/xxhash
contrib/libs/zlib
contrib/libs/zstd
)
diff --git a/library/cpp/monlib/metrics/metric_value.h b/library/cpp/monlib/metrics/metric_value.h
index 424f51f40e..607fcc8602 100644
--- a/library/cpp/monlib/metrics/metric_value.h
+++ b/library/cpp/monlib/metrics/metric_value.h
@@ -16,7 +16,7 @@ namespace NMonitoring {
template <typename T>
T FromFloatSafe(double d) {
static_assert(std::is_integral<T>::value, "this function only converts floats to integers");
- Y_ENSURE(::IsValidFloat(d) && d >= Min<T>() && d <= MaxFloor<T>(), "Cannot convert " << d << " to an integer value");
+ Y_ENSURE(::IsValidFloat(d) && d >= Min<T>() && d <= MaxFloor<T>(), "Cannot convert " << d << " to an integer value");
return static_cast<T>(d);
}
diff --git a/library/cpp/openssl/init/ya.make b/library/cpp/openssl/init/ya.make
index 19f291d980..aac073497c 100644
--- a/library/cpp/openssl/init/ya.make
+++ b/library/cpp/openssl/init/ya.make
@@ -1,6 +1,6 @@
LIBRARY()
-OWNER(pg g:zora)
+OWNER(pg g:zora)
PEERDIR(
contrib/libs/openssl
diff --git a/library/cpp/protobuf/json/json2proto.cpp b/library/cpp/protobuf/json/json2proto.cpp
index 66a9ef115f..640c10f5a5 100644
--- a/library/cpp/protobuf/json/json2proto.cpp
+++ b/library/cpp/protobuf/json/json2proto.cpp
@@ -42,12 +42,12 @@ static TString GetFieldName(const google::protobuf::FieldDescriptor& field,
if (config.UseJsonName) {
Y_ASSERT(!field.json_name().empty());
- TString name = field.json_name();
- if (!field.has_json_name() && !name.empty()) {
- // FIXME: https://st.yandex-team.ru/CONTRIB-139
- name[0] = AsciiToLower(name[0]);
- }
- return name;
+ TString name = field.json_name();
+ if (!field.has_json_name() && !name.empty()) {
+ // FIXME: https://st.yandex-team.ru/CONTRIB-139
+ name[0] = AsciiToLower(name[0]);
+ }
+ return name;
}
TString name = field.name();
@@ -61,7 +61,7 @@ static TString GetFieldName(const google::protobuf::FieldDescriptor& field,
name.to_upper();
break;
case NProtobufJson::TJson2ProtoConfig::FieldNameCamelCase:
- if (!name.empty()) {
+ if (!name.empty()) {
name[0] = AsciiToLower(name[0]);
}
break;
diff --git a/library/cpp/protobuf/json/proto2json_printer.cpp b/library/cpp/protobuf/json/proto2json_printer.cpp
index ae5bdbcd29..6123eab0f2 100644
--- a/library/cpp/protobuf/json/proto2json_printer.cpp
+++ b/library/cpp/protobuf/json/proto2json_printer.cpp
@@ -22,12 +22,12 @@ namespace NProtobufJson {
if (config.UseJsonName) {
Y_ASSERT(!field.json_name().empty());
- NewKeyStr = field.json_name();
- if (!field.has_json_name() && !NewKeyStr.empty()) {
- // FIXME: https://st.yandex-team.ru/CONTRIB-139
- NewKeyStr[0] = AsciiToLower(NewKeyStr[0]);
- }
- NewKeyBuf = NewKeyStr;
+ NewKeyStr = field.json_name();
+ if (!field.has_json_name() && !NewKeyStr.empty()) {
+ // FIXME: https://st.yandex-team.ru/CONTRIB-139
+ NewKeyStr[0] = AsciiToLower(NewKeyStr[0]);
+ }
+ NewKeyBuf = NewKeyStr;
return;
}
@@ -53,7 +53,7 @@ namespace NProtobufJson {
case TProto2JsonConfig::FieldNameCamelCase: {
NewKeyStr = field.name();
- if (!NewKeyStr.empty()) {
+ if (!NewKeyStr.empty()) {
NewKeyStr[0] = AsciiToLower(NewKeyStr[0]);
}
NewKeyBuf = NewKeyStr;
diff --git a/library/cpp/protobuf/json/ut/json.h b/library/cpp/protobuf/json/ut/json.h
index 3b3b27057b..c1f108e6e4 100644
--- a/library/cpp/protobuf/json/ut/json.h
+++ b/library/cpp/protobuf/json/ut/json.h
@@ -61,9 +61,9 @@ namespace NProtobufJsonTest {
#define UNIT_ASSERT_JSON_STRINGS_EQUAL(lhs, rhs) \
if (lhs != rhs) { \
NJson::TJsonValue _lhs_json, _rhs_json; \
- UNIT_ASSERT(NJson::ReadJsonTree(lhs, &_lhs_json)); \
- UNIT_ASSERT(NJson::ReadJsonTree(rhs, &_rhs_json)); \
+ UNIT_ASSERT(NJson::ReadJsonTree(lhs, &_lhs_json)); \
+ UNIT_ASSERT(NJson::ReadJsonTree(rhs, &_rhs_json)); \
UNIT_ASSERT_JSONS_EQUAL(_lhs_json, _rhs_json); \
- }
-
+ }
+
}
diff --git a/library/cpp/protobuf/json/ut/test.proto b/library/cpp/protobuf/json/ut/test.proto
index 41575daf9a..0fa996fd41 100644
--- a/library/cpp/protobuf/json/ut/test.proto
+++ b/library/cpp/protobuf/json/ut/test.proto
@@ -172,10 +172,10 @@ message TComplexMapType {
};
message TWithJsonName {
- optional int32 my_upper = 1 [json_name = "My-Upper"];
- optional int32 My_lower = 2 [json_name = "my-lower"];
- optional int32 Def_upper = 3; // json_name = "DefUpper"
- optional int32 def_lower = 4; // json_name = "defLower"
+ optional int32 my_upper = 1 [json_name = "My-Upper"];
+ optional int32 My_lower = 2 [json_name = "my-lower"];
+ optional int32 Def_upper = 3; // json_name = "DefUpper"
+ optional int32 def_lower = 4; // json_name = "defLower"
}
message TSingleRequiredString {
diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp
index 1a52646390..66001c4769 100644
--- a/library/cpp/resource/registry.cpp
+++ b/library/cpp/resource/registry.cpp
@@ -23,23 +23,23 @@ namespace {
struct TStore: public IStore, public THashMap<TStringBuf, TDescriptor*> {
void Store(const TStringBuf key, const TStringBuf data) override {
if (contains(key)) {
- const TStringBuf value = (*this)[key]->second;
- if (value != data) {
- size_t vsize = GetCodec()->DecompressedLength(value);
- size_t dsize = GetCodec()->DecompressedLength(data);
- if (vsize + dsize < 1000) {
- Y_VERIFY(false, "Redefinition of key %s:\n"
- " old value: %s,\n"
- " new value: %s.",
+ const TStringBuf value = (*this)[key]->second;
+ if (value != data) {
+ size_t vsize = GetCodec()->DecompressedLength(value);
+ size_t dsize = GetCodec()->DecompressedLength(data);
+ if (vsize + dsize < 1000) {
+ Y_VERIFY(false, "Redefinition of key %s:\n"
+ " old value: %s,\n"
+ " new value: %s.",
TString{key}.Quote().c_str(),
- Decompress(value).Quote().c_str(),
- Decompress(data).Quote().c_str());
- } else {
- Y_VERIFY(false, "Redefinition of key %s,"
+ Decompress(value).Quote().c_str(),
+ Decompress(data).Quote().c_str());
+ } else {
+ Y_VERIFY(false, "Redefinition of key %s,"
" old size: %zu,"
" new size: %zu.",
TString{key}.Quote().c_str(), vsize, dsize);
- }
+ }
}
} else {
D_.push_back(TDescriptor(key, data));
diff --git a/library/cpp/scheme/tests/ut/scheme_ut.cpp b/library/cpp/scheme/tests/ut/scheme_ut.cpp
index a8b829b6e1..1a5d07c31b 100644
--- a/library/cpp/scheme/tests/ut/scheme_ut.cpp
+++ b/library/cpp/scheme/tests/ut/scheme_ut.cpp
@@ -756,7 +756,7 @@ Y_UNIT_TEST_SUITE(TSchemeTest) {
TValue v = TValue::FromJson("{foo:bar}");
TValue w(std::move(v));
UNIT_ASSERT(v.IsNull());
- v = static_cast<TValue&>(v);
+ v = static_cast<TValue&>(v);
UNIT_ASSERT(v.IsNull());
UNIT_ASSERT_VALUES_EQUAL(w.Get("foo").GetString(), "bar");
v = std::move(w);
diff --git a/library/cpp/streams/bzip2/bzip2.cpp b/library/cpp/streams/bzip2/bzip2.cpp
index 2bb8592017..bccc5c6807 100644
--- a/library/cpp/streams/bzip2/bzip2.cpp
+++ b/library/cpp/streams/bzip2/bzip2.cpp
@@ -19,13 +19,13 @@ public:
}
inline void Init() {
- if (BZ2_bzDecompressInit(&BzStream_, 0, 0) != BZ_OK) {
+ if (BZ2_bzDecompressInit(&BzStream_, 0, 0) != BZ_OK) {
ythrow TBZipDecompressError() << "can not init bzip engine";
}
}
inline void Clear() noexcept {
- BZ2_bzDecompressEnd(&BzStream_);
+ BZ2_bzDecompressEnd(&BzStream_);
}
inline size_t Read(void* buf, size_t size) {
@@ -39,7 +39,7 @@ public:
}
}
- switch (BZ2_bzDecompress(&BzStream_)) {
+ switch (BZ2_bzDecompress(&BzStream_)) {
case BZ_STREAM_END: {
Clear();
Init();
@@ -93,7 +93,7 @@ public:
{
Zero(BzStream_);
- if (BZ2_bzCompressInit(&BzStream_, level, 0, 0) != BZ_OK) {
+ if (BZ2_bzCompressInit(&BzStream_, level, 0, 0) != BZ_OK) {
ythrow TBZipCompressError() << "can not init bzip engine";
}
@@ -102,7 +102,7 @@ public:
}
inline ~TImpl() {
- BZ2_bzCompressEnd(&BzStream_);
+ BZ2_bzCompressEnd(&BzStream_);
}
inline void Write(const void* buf, size_t size) {
@@ -115,7 +115,7 @@ public:
};
while (BzStream_.avail_in) {
- const int ret = BZ2_bzCompress(&BzStream_, BZ_RUN);
+ const int ret = BZ2_bzCompress(&BzStream_, BZ_RUN);
switch (ret) {
case BZ_RUN_OK:
@@ -142,14 +142,14 @@ public:
}
inline void Finish() {
- int ret = BZ2_bzCompress(&BzStream_, BZ_FINISH);
+ int ret = BZ2_bzCompress(&BzStream_, BZ_FINISH);
while (ret != BZ_STREAM_END) {
Stream_->Write(TmpBuf(), TmpBufLen() - BzStream_.avail_out);
BzStream_.next_out = TmpBuf();
BzStream_.avail_out = TmpBufLen();
- ret = BZ2_bzCompress(&BzStream_, BZ_FINISH);
+ ret = BZ2_bzCompress(&BzStream_, BZ_FINISH);
}
Stream_->Write(TmpBuf(), TmpBufLen() - BzStream_.avail_out);
diff --git a/library/cpp/streams/lz/lz.cpp b/library/cpp/streams/lz/lz.cpp
index a9fcb9bf6d..b65bb3ed96 100644
--- a/library/cpp/streams/lz/lz.cpp
+++ b/library/cpp/streams/lz/lz.cpp
@@ -475,7 +475,7 @@ public:
}
inline size_t Decompress(const char* data, size_t len, char* ptr, size_t max) {
- int res = LZ4_decompress_safe(data, ptr, len, max);
+ int res = LZ4_decompress_safe(data, ptr, len, max);
if (res < 0)
ythrow TDecompressorError();
return res;
diff --git a/library/cpp/timezone_conversion/civil.h b/library/cpp/timezone_conversion/civil.h
index e6de68233f..0e95b807ed 100644
--- a/library/cpp/timezone_conversion/civil.h
+++ b/library/cpp/timezone_conversion/civil.h
@@ -2,8 +2,8 @@
#include <util/datetime/base.h>
-#include <contrib/libs/cctz/include/cctz/civil_time.h>
-#include <contrib/libs/cctz/include/cctz/time_zone.h>
+#include <contrib/libs/cctz/include/cctz/civil_time.h>
+#include <contrib/libs/cctz/include/cctz/time_zone.h>
#include <util/generic/strbuf.h>
#include <util/generic/string.h>
diff --git a/library/cpp/timezone_conversion/convert.cpp b/library/cpp/timezone_conversion/convert.cpp
index 463bfd94aa..490bb4e270 100644
--- a/library/cpp/timezone_conversion/convert.cpp
+++ b/library/cpp/timezone_conversion/convert.cpp
@@ -1,6 +1,6 @@
#include "convert.h"
-#include <contrib/libs/cctz/include/cctz/civil_time.h>
+#include <contrib/libs/cctz/include/cctz/civil_time.h>
#include <util/generic/yexception.h>
diff --git a/library/cpp/timezone_conversion/convert.h b/library/cpp/timezone_conversion/convert.h
index 858ce65f59..768a9e110f 100644
--- a/library/cpp/timezone_conversion/convert.h
+++ b/library/cpp/timezone_conversion/convert.h
@@ -2,7 +2,7 @@
#include "civil.h"
-#include <contrib/libs/cctz/include/cctz/time_zone.h>
+#include <contrib/libs/cctz/include/cctz/time_zone.h>
#include <util/datetime/base.h>
#include <util/draft/datetime.h>
diff --git a/library/cpp/tld/ya.make b/library/cpp/tld/ya.make
index 7a7f90f03d..aeabbfeebf 100644
--- a/library/cpp/tld/ya.make
+++ b/library/cpp/tld/ya.make
@@ -2,7 +2,7 @@ LIBRARY()
OWNER(abolkhovityanov)
-PYTHON(
+PYTHON(
gen_tld.py tlds-alpha-by-domain.txt
IN tlds-alpha-by-domain.txt
STDOUT tld.inc
diff --git a/library/cpp/uri/parsefsm.rl6 b/library/cpp/uri/parsefsm.rl6
index 53956539d3..7097723650 100644
--- a/library/cpp/uri/parsefsm.rl6
+++ b/library/cpp/uri/parsefsm.rl6
@@ -479,13 +479,13 @@ bool TParser::doParse(const char* str_beg, size_t length)
%% write init nocs;
- if (0 == (Flags & TFeature::FeatureNoRelPath)) {
+ if (0 == (Flags & TFeature::FeatureNoRelPath)) {
cs = TParser_en_URI_ref;
- } else if (0 == (Flags & TFeature::FeatureAllowRootless)) {
+ } else if (0 == (Flags & TFeature::FeatureAllowRootless)) {
cs = TParser_en_URI_ref_no_rootless;
- } else {
+ } else {
cs = TParser_en_URI_ref_no_relpath;
- }
+ }
%% write exec;
diff --git a/library/cpp/yson/node/node.h b/library/cpp/yson/node/node.h
index 82b956272f..5f90f95df0 100644
--- a/library/cpp/yson/node/node.h
+++ b/library/cpp/yson/node/node.h
@@ -6,7 +6,7 @@
#include <util/generic/variant.h>
#include <util/generic/vector.h>
#include <util/generic/yexception.h>
-#include <util/generic/ylimits.h>
+#include <util/generic/ylimits.h>
#include <util/string/cast.h>
#include <cmath>
@@ -324,7 +324,7 @@ inline T TNode::ConvertTo() const {
case NYT::TNode::Uint64:
return IntCast<T>();
case NYT::TNode::Double:
- if (AsDouble() < Min<T>() || AsDouble() > MaxFloor<T>() || !std::isfinite(AsDouble())) {
+ if (AsDouble() < Min<T>() || AsDouble() > MaxFloor<T>() || !std::isfinite(AsDouble())) {
ythrow TTypeError() << AsDouble() << " can't be converted to " << TypeName<T>();
}
return AsDouble();
diff --git a/library/cpp/yson/node/node_ut.cpp b/library/cpp/yson/node/node_ut.cpp
index 0d385b54f8..448e99f575 100644
--- a/library/cpp/yson/node/node_ut.cpp
+++ b/library/cpp/yson/node/node_ut.cpp
@@ -345,14 +345,14 @@ Y_UNIT_TEST_SUITE(YtNodeTest) {
UNIT_ASSERT_EXCEPTION(TNode(-5.3).ConvertTo<ui8>(), TNode::TTypeError);
UNIT_ASSERT_EXCEPTION(TNode(-5.3).ConvertTo<ui64>(), TNode::TTypeError);
- UNIT_ASSERT_VALUES_EQUAL(TNode(127.0).ConvertTo<i8>(), 127);
- UNIT_ASSERT_EXCEPTION(TNode(128.0).ConvertTo<i8>(), TNode::TTypeError);
- UNIT_ASSERT_VALUES_EQUAL(TNode(255.0).ConvertTo<ui8>(), 255);
+ UNIT_ASSERT_VALUES_EQUAL(TNode(127.0).ConvertTo<i8>(), 127);
+ UNIT_ASSERT_EXCEPTION(TNode(128.0).ConvertTo<i8>(), TNode::TTypeError);
+ UNIT_ASSERT_VALUES_EQUAL(TNode(255.0).ConvertTo<ui8>(), 255);
UNIT_ASSERT_EXCEPTION(TNode(256.0).ConvertTo<ui8>(), TNode::TTypeError);
UNIT_ASSERT_EXCEPTION(TNode(1e100).ConvertTo<i64>(), TNode::TTypeError);
UNIT_ASSERT_EXCEPTION(TNode(1e100).ConvertTo<ui64>(), TNode::TTypeError);
{
- double v = 1ull << 63;
+ double v = 1ull << 63;
TNode node = v;
UNIT_ASSERT(node.IsDouble());
UNIT_ASSERT_EXCEPTION(node.ConvertTo<i64>(), TNode::TTypeError);