aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorAndrey Khalyavin <halyavin@gmail.com>2022-02-10 16:46:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:30 +0300
commit4b839d0704ee9be1dabb0310a1f03af24963637b (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp
parentf773626848a7c7456803654292e716b83d69cc12 (diff)
downloadydb-4b839d0704ee9be1dabb0310a1f03af24963637b.tar.gz
Restoring authorship annotation for Andrey Khalyavin <halyavin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/interconnect/event_holder_pool.h8
-rw-r--r--library/cpp/actors/interconnect/interconnect_common.h6
-rw-r--r--library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp6
-rw-r--r--library/cpp/actors/util/queue_oneone_inplace.h2
-rw-r--r--library/cpp/actors/util/unordered_cache.h2
-rw-r--r--library/cpp/binsaver/bin_saver.h10
-rw-r--r--library/cpp/blockcodecs/codecs_ut.cpp2
-rw-r--r--library/cpp/cgiparam/cgiparam.cpp2
-rw-r--r--library/cpp/codecs/ut/codecs_ut.cpp64
-rw-r--r--library/cpp/containers/bitseq/traits.h2
-rw-r--r--library/cpp/containers/comptrie/comptrie_builder.h2
-rw-r--r--library/cpp/containers/comptrie/comptrie_ut.cpp4
-rw-r--r--library/cpp/dbg_output/dumpers.h2
-rw-r--r--library/cpp/deprecated/accessors/accessors_ut.cpp8
-rw-r--r--library/cpp/deprecated/accessors/memory_traits.h8
-rw-r--r--library/cpp/deprecated/mapped_file/mapped_file.cpp6
-rw-r--r--library/cpp/deprecated/mapped_file/mapped_file.h2
-rw-r--r--library/cpp/deprecated/split/delim_string_iter.h12
-rw-r--r--library/cpp/lwtrace/mon/mon_lwtrace.cpp14
-rw-r--r--library/cpp/messagebus/actor/executor.cpp6
-rw-r--r--library/cpp/messagebus/duration_histogram.cpp2
-rw-r--r--library/cpp/messagebus/duration_histogram.h6
-rw-r--r--library/cpp/messagebus/key_value_printer.h2
-rw-r--r--library/cpp/messagebus/message_status_counter.h4
-rw-r--r--library/cpp/messagebus/protobuf/ybusbuf.h2
-rw-r--r--library/cpp/messagebus/rain_check/core/spawn_ut.cpp4
-rw-r--r--library/cpp/messagebus/rain_check/test/helper/misc.h6
-rw-r--r--library/cpp/messagebus/rain_check/test/perftest/perftest.cpp8
-rw-r--r--library/cpp/messagebus/www/www.cpp6
-rw-r--r--library/cpp/monlib/counters/counters.h4
-rw-r--r--library/cpp/packedtypes/zigzag.h4
-rw-r--r--library/cpp/packers/packers.h16
-rw-r--r--library/cpp/packers/ut/packers_ut.cpp2
-rw-r--r--library/cpp/scheme/tests/ut/scheme_ut.cpp4
-rw-r--r--library/cpp/testing/benchmark/bench.cpp2
-rw-r--r--library/cpp/testing/unittest/registar.h4
-rw-r--r--library/cpp/threading/light_rw_lock/lightrwlock.h2
-rw-r--r--library/cpp/threading/poor_man_openmp/thread_helper.h8
38 files changed, 127 insertions, 127 deletions
diff --git a/library/cpp/actors/interconnect/event_holder_pool.h b/library/cpp/actors/interconnect/event_holder_pool.h
index 90ce486e9e..b6090a3bc8 100644
--- a/library/cpp/actors/interconnect/event_holder_pool.h
+++ b/library/cpp/actors/interconnect/event_holder_pool.h
@@ -12,12 +12,12 @@ namespace NActors {
std::list<TEventHolder> FreeQueue;
TStackVec<THolder<IEventBase>, MaxEvents> Events;
TStackVec<THolder<TEventSerializedData>, MaxEvents> Buffers;
- std::shared_ptr<std::atomic<TAtomicBase>> Counter;
+ std::shared_ptr<std::atomic<TAtomicBase>> Counter;
ui64 NumBytes = 0;
~TEvFreeItems() {
if (Counter) {
- TAtomicBase res = Counter->fetch_sub(NumBytes) - NumBytes;
+ TAtomicBase res = Counter->fetch_sub(NumBytes) - NumBytes;
Y_VERIFY(res >= 0);
}
}
@@ -26,8 +26,8 @@ namespace NActors {
Y_VERIFY(!Counter);
const auto& counter = common->DestructorQueueSize;
const auto& max = common->MaxDestructorQueueSize;
- if (counter && (TAtomicBase)(counter->fetch_add(NumBytes) + NumBytes) > max) {
- counter->fetch_sub(NumBytes);
+ if (counter && (TAtomicBase)(counter->fetch_add(NumBytes) + NumBytes) > max) {
+ counter->fetch_sub(NumBytes);
return false;
}
Counter = counter;
diff --git a/library/cpp/actors/interconnect/interconnect_common.h b/library/cpp/actors/interconnect/interconnect_common.h
index 73b94931a8..285709a00c 100644
--- a/library/cpp/actors/interconnect/interconnect_common.h
+++ b/library/cpp/actors/interconnect/interconnect_common.h
@@ -13,8 +13,8 @@
#include "logging.h"
#include "event_filter.h"
-#include <atomic>
-
+#include <atomic>
+
namespace NActors {
enum class EEncryptionMode {
DISABLED, // no encryption is required at all
@@ -78,7 +78,7 @@ namespace NActors {
TInterconnectSettings Settings;
TRegisterMonPageCallback RegisterMonPage;
TActorId DestructorId;
- std::shared_ptr<std::atomic<TAtomicBase>> DestructorQueueSize;
+ std::shared_ptr<std::atomic<TAtomicBase>> DestructorQueueSize;
TAtomicBase MaxDestructorQueueSize = 1024 * 1024 * 1024;
TString ClusterUUID;
TVector<TString> AcceptUUID;
diff --git a/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp b/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
index 5686d50590..e6b2bd4e4c 100644
--- a/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
@@ -5,14 +5,14 @@
#include <library/cpp/monlib/dynamic_counters/counters.h>
#include <library/cpp/actors/interconnect/event_holder_pool.h>
-#include <atomic>
-
+#include <atomic>
+
using namespace NActors;
template<typename T>
TEventHolderPool Setup(T&& callback) {
auto common = MakeIntrusive<TInterconnectProxyCommon>();
- common->DestructorQueueSize = std::make_shared<std::atomic<TAtomicBase>>();
+ common->DestructorQueueSize = std::make_shared<std::atomic<TAtomicBase>>();
common->MaxDestructorQueueSize = 1024 * 1024;
return TEventHolderPool(common, callback);
}
diff --git a/library/cpp/actors/util/queue_oneone_inplace.h b/library/cpp/actors/util/queue_oneone_inplace.h
index 6b111968dd..d7ec8bb21c 100644
--- a/library/cpp/actors/util/queue_oneone_inplace.h
+++ b/library/cpp/actors/util/queue_oneone_inplace.h
@@ -5,7 +5,7 @@
template <typename T, ui32 TSize, typename TChunk = TQueueChunk<T, TSize>>
class TOneOneQueueInplace : TNonCopyable {
- static_assert(std::is_integral<T>::value || std::is_pointer<T>::value, "expect std::is_integral<T>::value || std::is_pointer<T>::valuer");
+ static_assert(std::is_integral<T>::value || std::is_pointer<T>::value, "expect std::is_integral<T>::value || std::is_pointer<T>::valuer");
TChunk* ReadFrom;
ui32 ReadPosition;
diff --git a/library/cpp/actors/util/unordered_cache.h b/library/cpp/actors/util/unordered_cache.h
index 80b657583a..76f036c0cf 100644
--- a/library/cpp/actors/util/unordered_cache.h
+++ b/library/cpp/actors/util/unordered_cache.h
@@ -5,7 +5,7 @@
template <typename T, ui32 Size = 512, ui32 ConcurrencyFactor = 1, typename TChunk = TQueueChunk<T, Size>>
class TUnorderedCache : TNonCopyable {
- static_assert(std::is_integral<T>::value || std::is_pointer<T>::value, "expect std::is_integral<T>::value || std::is_pointer<T>::value");
+ static_assert(std::is_integral<T>::value || std::is_pointer<T>::value, "expect std::is_integral<T>::value || std::is_pointer<T>::value");
public:
static constexpr ui32 Concurrency = ConcurrencyFactor * 4;
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h
index ca376324fa..412424889f 100644
--- a/library/cpp/binsaver/bin_saver.h
+++ b/library/cpp/binsaver/bin_saver.h
@@ -15,8 +15,8 @@
#include <util/memory/blob.h>
#include <util/digest/murmur.h>
-#include <array>
-#include <bitset>
+#include <array>
+#include <bitset>
#include <list>
#include <string>
@@ -133,7 +133,7 @@ private:
data.clear();
TStoredSize nSize;
Add(3, &nSize);
- TVector<typename AM::key_type, typename std::allocator_traits<typename AM::allocator_type>::template rebind_alloc<typename AM::key_type>> indices;
+ TVector<typename AM::key_type, typename std::allocator_traits<typename AM::allocator_type>::template rebind_alloc<typename AM::key_type>> indices;
indices.resize(nSize);
for (TStoredSize i = 0; i < nSize; ++i)
Add(1, &indices[i]);
@@ -144,7 +144,7 @@ private:
CheckOverflow(nSize, data.size());
Add(3, &nSize);
- TVector<typename AM::key_type, typename std::allocator_traits<typename AM::allocator_type>::template rebind_alloc<typename AM::key_type>> indices;
+ TVector<typename AM::key_type, typename std::allocator_traits<typename AM::allocator_type>::template rebind_alloc<typename AM::key_type>> indices;
indices.resize(nSize);
TStoredSize i = 1;
for (auto pos = data.begin(); pos != data.end(); ++pos, ++i)
@@ -163,7 +163,7 @@ private:
data.clear();
TStoredSize nSize;
Add(3, &nSize);
- TVector<typename AMM::key_type, typename std::allocator_traits<typename AMM::allocator_type>::template rebind_alloc<typename AMM::key_type>> indices;
+ TVector<typename AMM::key_type, typename std::allocator_traits<typename AMM::allocator_type>::template rebind_alloc<typename AMM::key_type>> indices;
indices.resize(nSize);
for (TStoredSize i = 0; i < nSize; ++i)
Add(1, &indices[i]);
diff --git a/library/cpp/blockcodecs/codecs_ut.cpp b/library/cpp/blockcodecs/codecs_ut.cpp
index ff56678999..bfe5a23690 100644
--- a/library/cpp/blockcodecs/codecs_ut.cpp
+++ b/library/cpp/blockcodecs/codecs_ut.cpp
@@ -19,7 +19,7 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) {
void TestAllAtOnce(size_t n, size_t m) {
TVector<TBuffer> datas;
- datas.emplace_back();
+ datas.emplace_back();
datas.push_back(Buffer("na gorshke sidel korol"));
datas.push_back(Buffer(TStringBuf("", 1)));
datas.push_back(Buffer(" "));
diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp
index 44775ffea8..f3277b8e4b 100644
--- a/library/cpp/cgiparam/cgiparam.cpp
+++ b/library/cpp/cgiparam/cgiparam.cpp
@@ -119,7 +119,7 @@ void TCgiParameters::ScanAdd(const TStringBuf query) {
void TCgiParameters::ScanAddUnescaped(const TStringBuf query) {
auto f = [this](const TStringBuf key, const TStringBuf val) {
- this->InsertUnescaped(key, val);
+ this->InsertUnescaped(key, val);
};
DoScan<false>(query, f);
diff --git a/library/cpp/codecs/ut/codecs_ut.cpp b/library/cpp/codecs/ut/codecs_ut.cpp
index e9170f9cf4..caf6089aef 100644
--- a/library/cpp/codecs/ut/codecs_ut.cpp
+++ b/library/cpp/codecs/ut/codecs_ut.cpp
@@ -923,7 +923,7 @@ private:
size_t outsz = buff.Size();
for (ui32 i = 0; i < inlearn.size(); ++i) {
- out.emplace_back();
+ out.emplace_back();
c->Encode(AsStrBuf(inlearn[i]), out[i]);
insz += inlearn[i].Size();
@@ -976,7 +976,7 @@ private:
TVector<TBuffer> d;
// 1. common case
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 1ULL);
AppendTo(d.back(), 10ULL);
AppendTo(d.back(), 100ULL);
@@ -985,7 +985,7 @@ private:
AppendTo(d.back(), 100000ULL);
// 2. delta overflow
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 1ULL);
AppendTo(d.back(), 10ULL);
AppendTo(d.back(), 100ULL);
@@ -994,7 +994,7 @@ private:
AppendTo(d.back(), (ui64)-10ULL);
// 3. bad sorting
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 1ULL);
AppendTo(d.back(), 10ULL);
AppendTo(d.back(), 1000ULL);
@@ -1003,7 +1003,7 @@ private:
AppendTo(d.back(), 100000ULL);
// all bad
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), -1LL);
AppendTo(d.back(), -1LL);
AppendTo(d.back(), -1LL);
@@ -1017,12 +1017,12 @@ private:
using namespace NCodecs;
{
TVector<TBuffer> d;
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), -1LL);
AppendTo(d.back(), -1LL);
AppendTo(d.back(), -1LL);
AppendTo(d.back(), -1LL);
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 0LL);
AppendTo(d.back(), 1LL);
AppendTo(d.back(), 2LL);
@@ -1030,7 +1030,7 @@ private:
AppendTo(d.back(), 0LL);
AppendTo(d.back(), 1LL);
AppendTo(d.back(), 2LL);
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 0LL);
AppendTo(d.back(), 1LL);
AppendTo(d.back(), 2LL);
@@ -1039,7 +1039,7 @@ private:
AppendTo(d.back(), 0LL);
AppendTo(d.back(), 1LL);
AppendTo(d.back(), 2LL);
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 0LL);
AppendTo(d.back(), -1LL);
AppendTo(d.back(), -2LL);
@@ -1055,12 +1055,12 @@ private:
}
{
TVector<TBuffer> d;
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), -1);
AppendTo(d.back(), -1);
AppendTo(d.back(), -1);
AppendTo(d.back(), -1);
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 0);
AppendTo(d.back(), 1);
AppendTo(d.back(), 2);
@@ -1069,7 +1069,7 @@ private:
AppendTo(d.back(), 0);
AppendTo(d.back(), 1);
AppendTo(d.back(), 2);
- d.emplace_back();
+ d.emplace_back();
AppendTo(d.back(), 0);
AppendTo(d.back(), -1);
AppendTo(d.back(), -2);
@@ -1085,7 +1085,7 @@ private:
}
{
TVector<TBuffer> d;
- d.emplace_back();
+ d.emplace_back();
for (auto& textValue : TextValues) {
AppendTo(d.back(), (ui32)strlen(textValue));
}
@@ -1095,7 +1095,7 @@ private:
}
{
TVector<TBuffer> d;
- d.emplace_back();
+ d.emplace_back();
for (auto& textValue : TextValues) {
AppendTo(d.back(), (ui64)strlen(textValue));
}
@@ -1112,7 +1112,7 @@ private:
TVector<TBuffer> learn;
for (auto& textValue : TextValues) {
- learn.emplace_back(textValue, strlen(textValue));
+ learn.emplace_back(textValue, strlen(textValue));
}
TestCodec<TCodec, true>(learn);
@@ -1123,11 +1123,11 @@ private:
{
TVector<TBuffer> learn;
- learn.emplace_back();
+ learn.emplace_back();
learn.back().Append('a');
TVector<TBuffer> test;
- test.emplace_back();
+ test.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
test.back().Append((ui8)i);
}
@@ -1137,7 +1137,7 @@ private:
{
TVector<TBuffer> learn;
- learn.emplace_back();
+ learn.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
for (ui32 j = 0; j < i; ++j) {
learn.back().Append((ui8)i);
@@ -1145,7 +1145,7 @@ private:
}
TVector<TBuffer> test;
- test.emplace_back();
+ test.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
test.back().Append((ui8)i);
}
@@ -1155,7 +1155,7 @@ private:
{
TVector<TBuffer> learn;
- learn.emplace_back();
+ learn.emplace_back();
for (ui32 i = 0; i < 128; ++i) {
for (ui32 j = 0; j < i; ++j) {
learn.back().Append((ui8)i);
@@ -1163,7 +1163,7 @@ private:
}
TVector<TBuffer> test;
- test.emplace_back();
+ test.emplace_back();
for (ui32 i = 128; i < 256; ++i) {
test.back().Append((ui8)i);
}
@@ -1200,7 +1200,7 @@ private:
TVector<TBuffer> data;
for (auto& textValue : TextValues) {
- data.emplace_back(textValue, strlen(textValue));
+ data.emplace_back(textValue, strlen(textValue));
}
TVector<TBuffer> outLearn;
@@ -1210,7 +1210,7 @@ private:
static_cast<ICodec&>(codec).Learn(data.begin(), data.end());
for (ui32 i = 0; i < data.size(); ++i) {
- outLearn.emplace_back();
+ outLearn.emplace_back();
codec.Encode(AsStrBuf(data[i]), outLearn[i]);
}
}
@@ -1236,7 +1236,7 @@ private:
codec.LearnByFreqs(TArrayRef<std::pair<char, ui64>>(freqs, Y_ARRAY_SIZE(freqs)));
for (ui32 i = 0; i < data.size(); ++i) {
- outLearnByFreqs.emplace_back();
+ outLearnByFreqs.emplace_back();
codec.Encode(AsStrBuf(data[i]), outLearnByFreqs[i]);
}
}
@@ -1254,7 +1254,7 @@ private:
TVector<TBuffer> learn;
for (auto& textValue : TextValues) {
- learn.emplace_back(textValue, strlen(textValue));
+ learn.emplace_back(textValue, strlen(textValue));
}
TestCodec<TSolarCodec, true>(learn, TVector<TBuffer>(), new TSolarCodec(512, 8));
@@ -1271,11 +1271,11 @@ private:
{
TVector<TBuffer> learn;
- learn.emplace_back();
+ learn.emplace_back();
learn.back().Append('a');
TVector<TBuffer> test;
- test.emplace_back();
+ test.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
test.back().Append((ui8)i);
}
@@ -1288,7 +1288,7 @@ private:
{
TVector<TBuffer> learn;
- learn.emplace_back();
+ learn.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
for (ui32 j = 0; j < i; ++j) {
learn.back().Append((ui8)i);
@@ -1296,7 +1296,7 @@ private:
}
TVector<TBuffer> test;
- test.emplace_back();
+ test.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
test.back().Append((ui8)i);
}
@@ -1312,7 +1312,7 @@ private:
using namespace NCodecs;
{
TVector<TBuffer> learn;
- learn.emplace_back();
+ learn.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
for (i32 j = i; j >= 0; --j) {
learn.back().Append((ui8)j);
@@ -1320,7 +1320,7 @@ private:
}
TVector<TBuffer> test;
- test.emplace_back();
+ test.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
test.back().Append((ui8)i);
}
@@ -1330,7 +1330,7 @@ private:
}
{
TVector<TBuffer> d;
- d.emplace_back();
+ d.emplace_back();
for (ui32 i = 0; i < 256; ++i) {
for (i32 j = i; j >= 0; --j) {
d.back().Append(i * i);
diff --git a/library/cpp/containers/bitseq/traits.h b/library/cpp/containers/bitseq/traits.h
index 9271654dfa..2330b1b4f2 100644
--- a/library/cpp/containers/bitseq/traits.h
+++ b/library/cpp/containers/bitseq/traits.h
@@ -44,6 +44,6 @@ struct TBitSeqTraits {
return res;
}
- static_assert(std::is_unsigned<TWord>::value, "Expected std::is_unsigned<T>::value.");
+ static_assert(std::is_unsigned<TWord>::value, "Expected std::is_unsigned<T>::value.");
static_assert((NumBits & (NumBits - 1)) == 0, "NumBits should be a power of 2.");
};
diff --git a/library/cpp/containers/comptrie/comptrie_builder.h b/library/cpp/containers/comptrie/comptrie_builder.h
index d6f3e84224..cf7d2e39a3 100644
--- a/library/cpp/containers/comptrie/comptrie_builder.h
+++ b/library/cpp/containers/comptrie/comptrie_builder.h
@@ -58,7 +58,7 @@ public:
// add already serialized data
bool AddPtr(const TSymbol* key, size_t keylen, const char* data);
bool AddPtr(const TKeyBuf& key, const char* data) {
- return AddPtr(key.data(), key.size(), data);
+ return AddPtr(key.data(), key.size(), data);
}
bool AddSubtreeInFile(const TSymbol* key, size_t keylen, const TString& filename);
diff --git a/library/cpp/containers/comptrie/comptrie_ut.cpp b/library/cpp/containers/comptrie/comptrie_ut.cpp
index be7e20a2a9..74bee09b5d 100644
--- a/library/cpp/containers/comptrie/comptrie_ut.cpp
+++ b/library/cpp/containers/comptrie/comptrie_ut.cpp
@@ -26,7 +26,7 @@
#include "search_iterator.h"
#include "pattern_searcher.h"
-#include <array>
+#include <array>
#include <iterator>
@@ -1435,7 +1435,7 @@ void TCompactTrieTest::TestFirstSymbolIteratorChar32() {
void TCompactTrieTest::TestArrayPacker() {
- using TDataInt = std::array<int, 2>;
+ using TDataInt = std::array<int, 2>;
const std::pair<TString, TDataInt> dataXxx{"xxx", {{15, 16}}};
const std::pair<TString, TDataInt> dataYyy{"yyy", {{20, 30}}};
diff --git a/library/cpp/dbg_output/dumpers.h b/library/cpp/dbg_output/dumpers.h
index 5384b8bd19..4868e97da0 100644
--- a/library/cpp/dbg_output/dumpers.h
+++ b/library/cpp/dbg_output/dumpers.h
@@ -103,7 +103,7 @@ struct TDumper<TArrayRef<T>>: public TSeqDumper {
};
template <class T, size_t N>
-struct TDumper<std::array<T, N>>: public TSeqDumper {
+struct TDumper<std::array<T, N>>: public TSeqDumper {
};
template <class T, class A>
diff --git a/library/cpp/deprecated/accessors/accessors_ut.cpp b/library/cpp/deprecated/accessors/accessors_ut.cpp
index 74cf059104..a9bdc9fcc4 100644
--- a/library/cpp/deprecated/accessors/accessors_ut.cpp
+++ b/library/cpp/deprecated/accessors/accessors_ut.cpp
@@ -5,8 +5,8 @@
#include <util/generic/buffer.h>
#include <util/generic/vector.h>
-#include <array>
-
+#include <array>
+
class TAccessorsTest: public TTestBase {
UNIT_TEST_SUITE(TAccessorsTest);
UNIT_TEST(TestAccessors);
@@ -82,10 +82,10 @@ private:
NAccessors::Init(sarr);
NAccessors::Clear(sarr);
- std::array<char, 10> carr;
+ std::array<char, 10> carr;
NAccessors::Init(carr);
NAccessors::Clear(carr);
- TestRead(carr, "std::array<char, 10>");
+ TestRead(carr, "std::array<char, 10>");
}
};
diff --git a/library/cpp/deprecated/accessors/memory_traits.h b/library/cpp/deprecated/accessors/memory_traits.h
index f4e88f042b..aa837705d3 100644
--- a/library/cpp/deprecated/accessors/memory_traits.h
+++ b/library/cpp/deprecated/accessors/memory_traits.h
@@ -9,14 +9,14 @@
#include <util/generic/vector.h>
#include <util/generic/typetraits.h>
-#include <array>
+#include <array>
#include <string>
-#include <utility>
+#include <utility>
template <typename T>
struct TMemoryTraits {
enum {
- SimpleMemory = std::is_arithmetic<T>::value,
+ SimpleMemory = std::is_arithmetic<T>::value,
ContinuousMemory = SimpleMemory,
OwnsMemory = SimpleMemory,
};
@@ -36,7 +36,7 @@ struct TMemoryTraits<T[n]> {
};
template <typename T, size_t n>
-struct TMemoryTraits<std::array<T, n>> {
+struct TMemoryTraits<std::array<T, n>> {
enum {
SimpleMemory = TMemoryTraits<T>::SimpleMemory,
ContinuousMemory = SimpleMemory,
diff --git a/library/cpp/deprecated/mapped_file/mapped_file.cpp b/library/cpp/deprecated/mapped_file/mapped_file.cpp
index e352d7952b..b0e4511299 100644
--- a/library/cpp/deprecated/mapped_file/mapped_file.cpp
+++ b/library/cpp/deprecated/mapped_file/mapped_file.cpp
@@ -20,11 +20,11 @@ TMappedFile::TMappedFile(const TFile& file, TFileMap::EOpenMode om, const char*
init(file, om, dbgName);
}
-void TMappedFile::precharge(size_t off, size_t size) const {
+void TMappedFile::precharge(size_t off, size_t size) const {
if (!Map_)
- return;
+ return;
- Map_->Precharge(off, size);
+ Map_->Precharge(off, size);
}
void TMappedFile::init(const TString& name) {
diff --git a/library/cpp/deprecated/mapped_file/mapped_file.h b/library/cpp/deprecated/mapped_file/mapped_file.h
index bf7881a60d..45859ed65a 100644
--- a/library/cpp/deprecated/mapped_file/mapped_file.h
+++ b/library/cpp/deprecated/mapped_file/mapped_file.h
@@ -64,7 +64,7 @@ public:
return (Map_ ? (void*)((unsigned char*)Map_->Ptr() + pos) : nullptr);
}
- void precharge(size_t pos = 0, size_t size = (size_t)-1) const;
+ void precharge(size_t pos = 0, size_t size = (size_t)-1) const;
void swap(TMappedFile& file) noexcept {
DoSwap(Map_, file.Map_);
diff --git a/library/cpp/deprecated/split/delim_string_iter.h b/library/cpp/deprecated/split/delim_string_iter.h
index 14fab35726..8e4ca171a0 100644
--- a/library/cpp/deprecated/split/delim_string_iter.h
+++ b/library/cpp/deprecated/split/delim_string_iter.h
@@ -10,12 +10,12 @@
class TDelimStringIter {
public:
- using value_type = TStringBuf;
- using difference_type = ptrdiff_t;
- using pointer = const TStringBuf*;
- using reference = const TStringBuf&;
- using iterator_category = std::forward_iterator_tag;
-
+ using value_type = TStringBuf;
+ using difference_type = ptrdiff_t;
+ using pointer = const TStringBuf*;
+ using reference = const TStringBuf&;
+ using iterator_category = std::forward_iterator_tag;
+
inline TDelimStringIter(const char* begin, const char* strEnd, TStringBuf delim)
: TDelimStringIter(TStringBuf(begin, strEnd), delim)
{
diff --git a/library/cpp/lwtrace/mon/mon_lwtrace.cpp b/library/cpp/lwtrace/mon/mon_lwtrace.cpp
index 09dbe49e88..a61ee9ce22 100644
--- a/library/cpp/lwtrace/mon/mon_lwtrace.cpp
+++ b/library/cpp/lwtrace/mon/mon_lwtrace.cpp
@@ -1544,10 +1544,10 @@ private:
public:
void Push(const NLWTrace::TProbe* probe)
{
- TableData.emplace_back();
+ TableData.emplace_back();
auto& row = TableData.back();
- row.emplace_back();
+ row.emplace_back();
TString& groups = row.back();
bool first = true;
for (const char* const* i = probe->Event.Groups; *i != nullptr; ++i, first = false) {
@@ -1556,7 +1556,7 @@ public:
row.push_back(ProbeHtml(probe->Event.GetProvider(), probe->Event.Name));
- row.emplace_back();
+ row.emplace_back();
TString& params = row.back();
first = true;
for (size_t i = 0; i < probe->Event.Signature.ParamCount; i++, first = false) {
@@ -2584,7 +2584,7 @@ private:
if (CutTs.Skip(item)) {
return;
}
- Table.emplace_back();
+ Table.emplace_back();
NAnalytics::TRow& row = Table.back();
row["_thread"] = tid;
if (item.Timestamp != TInstant::Zero()) {
@@ -2614,7 +2614,7 @@ private:
for (auto& v : Groups) {
const TString& group = v.first;
const TTrackLogRefs& tl = v.second;
- Table.emplace_back();
+ Table.emplace_back();
NAnalytics::TRow& row = Table.back();
row.Name = group;
for (const NLWTrace::TLogItem& item : tl.Items) {
@@ -2737,12 +2737,12 @@ struct TPatternNode {
using namespace NAnalytics;
NAnalytics::TTable ret;
for (ui64 x : ResTotalAll) {
- ret.emplace_back();
+ ret.emplace_back();
TRow& row = ret.back();
row["resTotal"] = double(x) * 1000.0 / NHPTimer::GetClockRate();
}
for (ui64 x : ResLastAll) {
- ret.emplace_back();
+ ret.emplace_back();
TRow& row = ret.back();
row["resLast"] = double(x) * 1000.0 / NHPTimer::GetClockRate();
}
diff --git a/library/cpp/messagebus/actor/executor.cpp b/library/cpp/messagebus/actor/executor.cpp
index fb6c548089..7a2227a458 100644
--- a/library/cpp/messagebus/actor/executor.cpp
+++ b/library/cpp/messagebus/actor/executor.cpp
@@ -10,8 +10,8 @@
#include <util/system/tls.h>
#include <util/system/yassert.h>
-#include <array>
-
+#include <array>
+
using namespace NActor;
using namespace NActor::NPrivate;
@@ -35,7 +35,7 @@ namespace {
ui64 Start;
ui64 LastTime;
- std::array<TRecord, 3600> Records;
+ std::array<TRecord, 3600> Records;
THistoryInternal() {
Start = TInstant::Now().Seconds();
diff --git a/library/cpp/messagebus/duration_histogram.cpp b/library/cpp/messagebus/duration_histogram.cpp
index 366372907d..32a0001d41 100644
--- a/library/cpp/messagebus/duration_histogram.cpp
+++ b/library/cpp/messagebus/duration_histogram.cpp
@@ -32,7 +32,7 @@ namespace {
namespace {
struct TMarks {
- std::array<TDuration, TDurationHistogram::Buckets> Marks;
+ std::array<TDuration, TDurationHistogram::Buckets> Marks;
TMarks() {
Marks[0] = TDuration::Zero();
diff --git a/library/cpp/messagebus/duration_histogram.h b/library/cpp/messagebus/duration_histogram.h
index ea5a423eaf..ed060b0101 100644
--- a/library/cpp/messagebus/duration_histogram.h
+++ b/library/cpp/messagebus/duration_histogram.h
@@ -4,16 +4,16 @@
#include <util/generic/bitops.h>
#include <util/generic/string.h>
-#include <array>
+#include <array>
struct TDurationHistogram {
static const unsigned Buckets = 20;
- std::array<ui64, Buckets> Times;
+ std::array<ui64, Buckets> Times;
static const unsigned SecondBoundary = 11;
TDurationHistogram() {
- Times.fill(0);
+ Times.fill(0);
}
static unsigned BucketFor(TDuration d) {
diff --git a/library/cpp/messagebus/key_value_printer.h b/library/cpp/messagebus/key_value_printer.h
index 385b6e0960..bca1fde50e 100644
--- a/library/cpp/messagebus/key_value_printer.h
+++ b/library/cpp/messagebus/key_value_printer.h
@@ -17,7 +17,7 @@ public:
~TKeyValuePrinter();
template <typename TKey, typename TValue>
- void AddRow(const TKey& key, const TValue& value, bool leftAlign = !std::is_integral<TValue>::value) {
+ void AddRow(const TKey& key, const TValue& value, bool leftAlign = !std::is_integral<TValue>::value) {
return AddRowImpl(ToString(key), ToString(value), leftAlign);
}
diff --git a/library/cpp/messagebus/message_status_counter.h b/library/cpp/messagebus/message_status_counter.h
index a935ab9b75..e8ba2fdd31 100644
--- a/library/cpp/messagebus/message_status_counter.h
+++ b/library/cpp/messagebus/message_status_counter.h
@@ -6,7 +6,7 @@
#include <util/generic/string.h>
-#include <array>
+#include <array>
namespace NBus {
namespace NPrivate {
@@ -14,7 +14,7 @@ namespace NBus {
static TMessageStatusRecord::EMessageStatus MessageStatusToProtobuf(EMessageStatus status) {
return (TMessageStatusRecord::EMessageStatus)status;
}
-
+
std::array<unsigned, MESSAGE_STATUS_COUNT> Counts;
unsigned& operator[](EMessageStatus index) {
diff --git a/library/cpp/messagebus/protobuf/ybusbuf.h b/library/cpp/messagebus/protobuf/ybusbuf.h
index 3a5fe4e2b7..57b4267ea5 100644
--- a/library/cpp/messagebus/protobuf/ybusbuf.h
+++ b/library/cpp/messagebus/protobuf/ybusbuf.h
@@ -9,7 +9,7 @@
#include <util/generic/vector.h>
#include <util/stream/mem.h>
-#include <array>
+#include <array>
namespace NBus {
using TBusBufferRecord = ::google::protobuf::Message;
diff --git a/library/cpp/messagebus/rain_check/core/spawn_ut.cpp b/library/cpp/messagebus/rain_check/core/spawn_ut.cpp
index 0435262b59..ba5a5e41cf 100644
--- a/library/cpp/messagebus/rain_check/core/spawn_ut.cpp
+++ b/library/cpp/messagebus/rain_check/core/spawn_ut.cpp
@@ -7,7 +7,7 @@
#include <util/system/event.h>
-#include <array>
+#include <array>
using namespace NRainCheck;
using namespace NActor;
@@ -116,7 +116,7 @@ Y_UNIT_TEST_SUITE(Spawn) {
{
}
- std::array<TSubtaskCompletion, 3> Subtasks;
+ std::array<TSubtaskCompletion, 3> Subtasks;
TContinueFunc Start() override {
if (I == 1000) {
diff --git a/library/cpp/messagebus/rain_check/test/helper/misc.h b/library/cpp/messagebus/rain_check/test/helper/misc.h
index 7b37051f49..9150be4d2f 100644
--- a/library/cpp/messagebus/rain_check/test/helper/misc.h
+++ b/library/cpp/messagebus/rain_check/test/helper/misc.h
@@ -2,7 +2,7 @@
#include <library/cpp/messagebus/rain_check/core/rain_check.h>
-#include <array>
+#include <array>
namespace NRainCheck {
struct TNopSimpleTask: public ISimpleTask {
@@ -32,7 +32,7 @@ namespace NRainCheck {
{
}
- std::array<TSubtaskCompletion, 2> Completion;
+ std::array<TSubtaskCompletion, 2> Completion;
void Run() override;
};
@@ -47,7 +47,7 @@ namespace NRainCheck {
{
}
- std::array<TSubtaskCompletion, 2> Completion;
+ std::array<TSubtaskCompletion, 2> Completion;
TContinueFunc Start() override;
diff --git a/library/cpp/messagebus/rain_check/test/perftest/perftest.cpp b/library/cpp/messagebus/rain_check/test/perftest/perftest.cpp
index d34ed1a8f8..22edbd8c6b 100644
--- a/library/cpp/messagebus/rain_check/test/perftest/perftest.cpp
+++ b/library/cpp/messagebus/rain_check/test/perftest/perftest.cpp
@@ -4,7 +4,7 @@
#include <util/datetime/base.h>
-#include <array>
+#include <array>
using namespace NRainCheck;
@@ -38,7 +38,7 @@ struct TCoroOuter: public ICoroTask {
do {
for (unsigned i = 0; i < current; ++i) {
- std::array<TSubtaskCompletion, SUBTASKS> completion;
+ std::array<TSubtaskCompletion, SUBTASKS> completion;
for (unsigned j = 0; j < SUBTASKS; ++j) {
//SpawnSubtask<TNopSimpleTask>(Env, &completion[j]);
@@ -82,7 +82,7 @@ struct TSimpleOuter: public ISimpleTask {
return &TSimpleOuter::Spawn;
}
- std::array<TSubtaskCompletion, SUBTASKS> Completion;
+ std::array<TSubtaskCompletion, SUBTASKS> Completion;
TContinueFunc Spawn() {
for (unsigned j = 0; j < SUBTASKS; ++j) {
@@ -124,7 +124,7 @@ struct TReproduceCrashTask: public ISimpleTask {
{
}
- std::array<TSubtaskCompletion, SUBTASKS> Completion;
+ std::array<TSubtaskCompletion, SUBTASKS> Completion;
TContinueFunc Start() override {
for (unsigned j = 0; j < 2; ++j) {
diff --git a/library/cpp/messagebus/www/www.cpp b/library/cpp/messagebus/www/www.cpp
index 33c5fa0ca0..62ec241d85 100644
--- a/library/cpp/messagebus/www/www.cpp
+++ b/library/cpp/messagebus/www/www.cpp
@@ -74,7 +74,7 @@ namespace {
TValuePtr current = FindByName(p->GetNameInternal());
if (!current) {
- Entries.emplace_back(p->GetNameInternal(), p);
+ Entries.emplace_back(p->GetNameInternal(), p);
return;
}
}
@@ -89,7 +89,7 @@ namespace {
TValuePtr current = FindByName(name);
if (!current) {
- Entries.emplace_back(name, p);
+ Entries.emplace_back(name, p);
return;
}
}
@@ -901,7 +901,7 @@ struct TBusWwwHttpServer::TImpl: public THttpServer::ICallBack {
cgiParams.Scan(url.Get(THttpURL::FieldQuery));
TBusWww::TOptionalParams params;
- //params.ParentLinks.emplace_back();
+ //params.ParentLinks.emplace_back();
//params.ParentLinks.back().Title = "temp";
//params.ParentLinks.back().Href = "http://wiki.yandex-team.ru/";
diff --git a/library/cpp/monlib/counters/counters.h b/library/cpp/monlib/counters/counters.h
index 02eb8bba99..038b55f0c8 100644
--- a/library/cpp/monlib/counters/counters.h
+++ b/library/cpp/monlib/counters/counters.h
@@ -16,8 +16,8 @@
#include <util/system/sem.h>
#include <util/system/spinlock.h>
-#include <array>
-
+#include <array>
+
namespace NMonitoring {
#define BEGIN_OUTPUT_COUNTERS \
void OutputImpl(IOutputStream& out) { \
diff --git a/library/cpp/packedtypes/zigzag.h b/library/cpp/packedtypes/zigzag.h
index 8d54a906da..548403f838 100644
--- a/library/cpp/packedtypes/zigzag.h
+++ b/library/cpp/packedtypes/zigzag.h
@@ -9,13 +9,13 @@
template <typename TSignedInt>
inline auto ZigZagEncode(TSignedInt n) -> std::make_unsigned_t<TSignedInt> {
- static_assert(std::is_signed<TSignedInt>::value && std::is_integral<TSignedInt>::value, "Expected signed integral type.");
+ static_assert(std::is_signed<TSignedInt>::value && std::is_integral<TSignedInt>::value, "Expected signed integral type.");
auto un = static_cast<std::make_unsigned_t<TSignedInt>>(n);
return (un << 1) ^ (n >> (CHAR_BIT * sizeof(TSignedInt) - 1));
}
template <typename TUnsignedInt>
inline auto ZigZagDecode(TUnsignedInt n) -> std::make_signed_t<TUnsignedInt> {
- static_assert(std::is_unsigned<TUnsignedInt>::value, "Expected unsigned integral type.");
+ static_assert(std::is_unsigned<TUnsignedInt>::value, "Expected unsigned integral type.");
return (n >> 1) ^ -static_cast<std::make_signed_t<TUnsignedInt>>(n & 1);
}
diff --git a/library/cpp/packers/packers.h b/library/cpp/packers/packers.h
index 96043548dd..1bde1b59aa 100644
--- a/library/cpp/packers/packers.h
+++ b/library/cpp/packers/packers.h
@@ -6,8 +6,8 @@
#include <util/generic/list.h>
#include <util/generic/vector.h>
#include <util/generic/bitops.h>
-
-#include <array>
+
+#include <array>
// Data serialization strategy class.
// Default realization can pack only limited range of types, but you can pack any data other using your own strategy class.
@@ -87,8 +87,8 @@ namespace NPackers {
template <class T>
inline ui64 ConvertIntegral(const T& data) {
- static_assert(std::is_integral<T>::value, "T must be integral type");
- return NImpl::TConvertImpl<T, std::is_signed<T>::value>::Convert(data);
+ static_assert(std::is_integral<T>::value, "T must be integral type");
+ return NImpl::TConvertImpl<T, std::is_signed<T>::value>::Convert(data);
}
//---------------------------------
@@ -178,7 +178,7 @@ namespace NPackers {
template <class T>
inline void TIntegralPacker<T>::UnpackLeaf(const char* p, T& t) const {
- NImpl::TUnpackLeafImpl<T, std::is_signed<T>::value>().UnpackLeaf(p, t);
+ NImpl::TUnpackLeafImpl<T, std::is_signed<T>::value>().UnpackLeaf(p, t);
}
template <class T>
@@ -487,17 +487,17 @@ namespace NPackers {
}
//------------------------------------------------------------------------------------------
- // Packer for fixed-size arrays, i.e. for std::array.
+ // Packer for fixed-size arrays, i.e. for std::array.
// Saves memory by not storing anything about their size.
// SkipLeaf skips every value, so can be slow for big arrays.
- // Requires std::tuple_size<TValue>, TValue::operator[] and possibly TValue::value_type.
+ // Requires std::tuple_size<TValue>, TValue::operator[] and possibly TValue::value_type.
template <class TValue, class TElementPacker = TPacker<typename TValue::value_type>>
class TArrayPacker {
public:
using TElemPacker = TElementPacker;
enum {
- Size = std::tuple_size<TValue>::value
+ Size = std::tuple_size<TValue>::value
};
void UnpackLeaf(const char* p, TValue& t) const {
diff --git a/library/cpp/packers/ut/packers_ut.cpp b/library/cpp/packers/ut/packers_ut.cpp
index 0364d2327f..18ce2150d1 100644
--- a/library/cpp/packers/ut/packers_ut.cpp
+++ b/library/cpp/packers/ut/packers_ut.cpp
@@ -19,7 +19,7 @@
#include "packers.h"
-#include <array>
+#include <array>
#include <iterator>
class TPackersTest: public TTestBase {
diff --git a/library/cpp/scheme/tests/ut/scheme_ut.cpp b/library/cpp/scheme/tests/ut/scheme_ut.cpp
index 1f0a9af645..1a5d07c31b 100644
--- a/library/cpp/scheme/tests/ut/scheme_ut.cpp
+++ b/library/cpp/scheme/tests/ut/scheme_ut.cpp
@@ -186,8 +186,8 @@ Y_UNIT_TEST_SUITE(TSchemeTest) {
template <typename T>
void DoCheckAssignment(T t, T tless, T tmore, TStringBuf s, TStringBuf ss) {
- bool expectint = std::is_integral<T>::value;
- bool expectnum = std::is_arithmetic<T>::value;
+ bool expectint = std::is_integral<T>::value;
+ bool expectnum = std::is_arithmetic<T>::value;
bool expectbool = std::is_same<bool, T>::value;
{
diff --git a/library/cpp/testing/benchmark/bench.cpp b/library/cpp/testing/benchmark/bench.cpp
index d0439fd3e4..08d8708005 100644
--- a/library/cpp/testing/benchmark/bench.cpp
+++ b/library/cpp/testing/benchmark/bench.cpp
@@ -25,7 +25,7 @@
#include <util/stream/format.h>
#include <util/system/yield.h>
-using re2::RE2;
+using re2::RE2;
using namespace NBench;
using namespace NColorizer;
diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h
index 2693ea21ca..44517a0092 100644
--- a/library/cpp/testing/unittest/registar.h
+++ b/library/cpp/testing/unittest/registar.h
@@ -673,7 +673,7 @@ public: \
};
template <class T, class U>
- using TCompareValues = TCompareValuesImpl<T, U, std::is_integral<T>::value && std::is_integral<U>::value>;
+ using TCompareValues = TCompareValuesImpl<T, U, std::is_integral<T>::value && std::is_integral<U>::value>;
template <typename T, typename U>
static inline bool CompareEqual(const T& a, const U& b) {
@@ -688,7 +688,7 @@ public: \
template <typename T, typename U>
static inline bool CompareAndMakeStrings(const T& a, const U& b, TString& as, TString& asInd, TString& bs, TString& bsInd, bool& usePlainDiff, bool want) {
const bool have = CompareEqual(a, b);
- usePlainDiff = std::is_integral<T>::value && std::is_integral<U>::value;
+ usePlainDiff = std::is_integral<T>::value && std::is_integral<U>::value;
if (want == have) {
return true;
diff --git a/library/cpp/threading/light_rw_lock/lightrwlock.h b/library/cpp/threading/light_rw_lock/lightrwlock.h
index c995f5c752..931a1817bc 100644
--- a/library/cpp/threading/light_rw_lock/lightrwlock.h
+++ b/library/cpp/threading/light_rw_lock/lightrwlock.h
@@ -29,7 +29,7 @@
*/
#include <linux/futex.h>
-#include <unistd.h>
+#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
diff --git a/library/cpp/threading/poor_man_openmp/thread_helper.h b/library/cpp/threading/poor_man_openmp/thread_helper.h
index 182712f61d..0ecee0590b 100644
--- a/library/cpp/threading/poor_man_openmp/thread_helper.h
+++ b/library/cpp/threading/poor_man_openmp/thread_helper.h
@@ -9,7 +9,7 @@
#include <util/system/mutex.h>
#include <util/stream/output.h>
-#include <functional>
+#include <functional>
#include <cstdlib>
class TMtpQueueHelper {
@@ -40,10 +40,10 @@ namespace NYmp {
TMtpQueueHelper::Instance().SetThreadCount(threads);
}
- inline size_t GetThreadCount() {
+ inline size_t GetThreadCount() {
return TMtpQueueHelper::Instance().GetThreadCount();
- }
-
+ }
+
template <typename T>
inline void ParallelForStaticChunk(T begin, T end, size_t chunkSize, std::function<void(T)> func) {
chunkSize = Max<size_t>(chunkSize, 1);