aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormihaild <mihaild@yandex-team.ru>2022-02-10 16:46:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:59 +0300
commit246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae (patch)
tree2a65611ade91c8ae2f55647107c1a11ea743abd5
parent5598c5e7bc7619bd51d87fea7b880b7788ad0b47 (diff)
downloadydb-246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae.tar.gz
Restoring authorship annotation for <mihaild@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--build/ya.conf.json2
-rw-r--r--contrib/libs/pire/pire/stub/stl.h4
-rw-r--r--contrib/libs/ya.make2
-rw-r--r--contrib/tools/ya.make2
-rw-r--r--library/cpp/actors/dnscachelib/dnscache.cpp4
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp10
-rw-r--r--library/cpp/actors/testlib/test_runtime.h2
-rw-r--r--library/cpp/binsaver/bin_saver.cpp2
-rw-r--r--library/cpp/cache/cache.h12
-rw-r--r--library/cpp/codecs/ut/codecs_ut.cpp2
-rw-r--r--library/cpp/compproto/compproto_ut.cpp16
-rw-r--r--library/cpp/compproto/huff.h2
-rw-r--r--library/cpp/containers/atomizer/atomizer.h14
-rw-r--r--library/cpp/containers/comptrie/comptrie_trie.h6
-rw-r--r--library/cpp/containers/comptrie/comptrie_ut.cpp6
-rw-r--r--library/cpp/containers/flat_hash/lib/containers.h2
-rw-r--r--library/cpp/containers/sorted_vector/sorted_vector.h14
-rw-r--r--library/cpp/containers/str_map/str_map.h14
-rw-r--r--library/cpp/dns/cache.cpp2
-rw-r--r--library/cpp/histogram/adaptive/block_histogram.h2
-rw-r--r--library/cpp/histogram/adaptive/common.h2
-rw-r--r--library/cpp/histogram/adaptive/fixed_bin_histogram.h4
-rw-r--r--library/cpp/histogram/adaptive/multi_histogram.h4
-rw-r--r--library/cpp/http/io/headers_ut.cpp2
-rw-r--r--library/cpp/linear_regression/linear_regression.h2
-rw-r--r--library/cpp/messagebus/config/defs.h2
-rw-r--r--library/cpp/messagebus/session_impl.cpp4
-rw-r--r--library/cpp/on_disk/chunks/chunks_ut.cpp4
-rw-r--r--library/cpp/packers/packers.h12
-rw-r--r--library/cpp/packers/ut/packers_ut.cpp2
-rw-r--r--library/cpp/regex/pire/regexp.h2
-rw-r--r--library/cpp/resource/registry.cpp2
-rw-r--r--library/cpp/scheme/scheme_cast.h12
-rw-r--r--library/cpp/string_utils/levenshtein_diff/levenshtein_diff.h4
-rw-r--r--library/cpp/threading/task_scheduler/task_scheduler.cpp4
-rw-r--r--library/cpp/unicode/normalization/generated/decomposition.cpp4
-rw-r--r--library/cpp/unicode/normalization/normalization.h6
-rw-r--r--tools/ya.make2
-rw-r--r--util/charset/benchmark/utf8_to_wide/main.cpp96
-rw-r--r--util/charset/generated/unidata.cpp12
-rw-r--r--util/charset/unicode_table.h8
-rw-r--r--util/charset/unidata.h6
-rw-r--r--util/charset/utf8.h36
-rw-r--r--util/charset/utf8_ut.cpp20
-rw-r--r--util/charset/wide.h184
-rw-r--r--util/charset/wide_sse41.cpp78
-rw-r--r--util/charset/ya.make6
-rw-r--r--util/digest/city.h6
-rw-r--r--util/draft/enum.h12
-rw-r--r--util/generic/algorithm.h22
-rw-r--r--util/generic/algorithm_ut.cpp4
-rw-r--r--util/generic/deque.h4
-rw-r--r--util/generic/hash.h26
-rw-r--r--util/generic/hash_set.h20
-rw-r--r--util/generic/hash_ut.cpp12
-rw-r--r--util/generic/list.h2
-rw-r--r--util/generic/map.h2
-rw-r--r--util/generic/map_ut.cpp26
-rw-r--r--util/generic/set_ut.cpp2
-rw-r--r--util/generic/typetraits.h14
-rw-r--r--util/generic/vector.h4
-rw-r--r--util/str_stl.h2
-rw-r--r--util/system/fasttime.cpp4
-rw-r--r--util/system/thread.cpp2
-rw-r--r--util/system/tls.cpp4
-rw-r--r--util/system/tls.h4
-rw-r--r--util/system/types.h6
-rw-r--r--ydb/core/base/tablet.h14
-rw-r--r--ydb/core/blobstorage/pdisk/blobstorage_pdisk_requestimpl.h2
-rw-r--r--ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap.h4
-rw-r--r--ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap_ut.cpp2
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp2
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeletonfront.cpp2
-rw-r--r--ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp14
-rw-r--r--ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.h10
-rw-r--r--ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogmem.h12
-rw-r--r--ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogreader.cpp4
-rw-r--r--ydb/core/client/minikql_compile/yql_expr_minikql.cpp2
-rw-r--r--ydb/core/client/server/msgbus_tabletreq.h6
-rw-r--r--ydb/core/persqueue/type_codecs_defs.h2
-rw-r--r--ydb/core/scheme/scheme_types_auto.h2
-rw-r--r--ydb/core/scheme_types/scheme_type_metadata.h4
-rw-r--r--ydb/core/scheme_types/scheme_types_defs.h2
-rw-r--r--ydb/core/tablet/pipe_tracker.cpp6
-rw-r--r--ydb/core/tablet/pipe_tracker_ut.cpp2
-rw-r--r--ydb/core/tablet/tablet_req_rebuildhistory.cpp60
-rw-r--r--ydb/core/testlib/tablet_helpers.cpp8
-rw-r--r--ydb/core/tx/coordinator/coordinator_impl.h2
-rw-r--r--ydb/core/tx/mediator/execute_queue.cpp10
-rw-r--r--ydb/core/tx/mediator/mediator_impl.h2
-rw-r--r--ydb/core/util/cache.h10
-rw-r--r--ydb/library/yql/minikql/comp_nodes/ut/mkql_dict_ut.cpp20
-rw-r--r--ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp6
-rw-r--r--ydb/library/yql/minikql/invoke_builtins/mkql_builtins.cpp4
-rw-r--r--ydb/library/yql/minikql/mkql_function_registry.cpp2
-rw-r--r--ydb/library/yql/minikql/mkql_node.cpp102
-rw-r--r--ydb/library/yql/minikql/mkql_node.h12
-rw-r--r--ydb/library/yql/minikql/mkql_node_builder.cpp12
-rw-r--r--ydb/library/yql/minikql/mkql_node_printer.cpp8
-rw-r--r--ydb/library/yql/minikql/mkql_node_serialization.cpp48
-rw-r--r--ydb/library/yql/minikql/mkql_node_ut.cpp20
-rw-r--r--ydb/library/yql/minikql/mkql_opt_literal.cpp2
102 files changed, 619 insertions, 619 deletions
diff --git a/build/ya.conf.json b/build/ya.conf.json
index 5f7cc875d6..97f393eb6f 100644
--- a/build/ya.conf.json
+++ b/build/ya.conf.json
@@ -7162,7 +7162,7 @@
},
"you_complete_me": {
"formula": {
- "sandbox_id": 121751471,
+ "sandbox_id": 121751471,
"match": "YouCompleteMe"
}
},
diff --git a/contrib/libs/pire/pire/stub/stl.h b/contrib/libs/pire/pire/stub/stl.h
index 98ebd9f7c6..f2803f6c64 100644
--- a/contrib/libs/pire/pire/stub/stl.h
+++ b/contrib/libs/pire/pire/stub/stl.h
@@ -28,13 +28,13 @@
namespace Pire {
using ystring = TString;
template<size_t N> using ybitset = std::bitset<N>;
- template<typename T1, typename T2> using ypair = std::pair<T1, T2>;
+ template<typename T1, typename T2> using ypair = std::pair<T1, T2>;
template<typename T> using yauto_ptr = std::auto_ptr<T>;
template<typename Arg1, typename Arg2, typename Result> using ybinary_function = std::binary_function<Arg1, Arg2, Result>;
template<typename T1, typename T2>
inline ypair<T1, T2> ymake_pair(T1 v1, T2 v2) {
- return std::make_pair(v1, v2);
+ return std::make_pair(v1, v2);
}
template<typename T>
diff --git a/contrib/libs/ya.make b/contrib/libs/ya.make
index 9c4640fdcf..cedc94726a 100644
--- a/contrib/libs/ya.make
+++ b/contrib/libs/ya.make
@@ -59,7 +59,7 @@ RECURSE(
eccodes/tools
eigen
expat
- falconn
+ falconn
farmhash
farmhash/ut
faster-rnnlm
diff --git a/contrib/tools/ya.make b/contrib/tools/ya.make
index 750911c587..933c6d5acf 100644
--- a/contrib/tools/ya.make
+++ b/contrib/tools/ya.make
@@ -45,7 +45,7 @@ RECURSE(
unbound/build
vowpal_wabbit
wapiti
- word2vec
+ word2vec
xdelta3
xsltproc
yasm
diff --git a/library/cpp/actors/dnscachelib/dnscache.cpp b/library/cpp/actors/dnscachelib/dnscache.cpp
index 649339ddb2..2486326638 100644
--- a/library/cpp/actors/dnscachelib/dnscache.cpp
+++ b/library/cpp/actors/dnscachelib/dnscache.cpp
@@ -194,7 +194,7 @@ TDnsCache::Resolve(const TString& hostname, int family, bool cacheOnly) {
} else {
/* Never resolved, create cache entry */
LWPROBE(ResolveCacheNew, hostname);
- p = HostCache.insert(std::make_pair(hostname, THost())).first;
+ p = HostCache.insert(std::make_pair(hostname, THost())).first;
}
ACacheMisses += 1;
}
@@ -250,7 +250,7 @@ const TDnsCache::TAddr& TDnsCache::ResolveAddr(const in6_addr& addr, int family)
} else {
/* Never resolved, create cache entry */
- p = AddrCache.insert(std::make_pair(addr, TAddr())).first;
+ p = AddrCache.insert(std::make_pair(addr, TAddr())).first;
}
PtrCacheMisses += 1;
}
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 6fa25b9965..a69c2f5cf7 100644
--- a/library/cpp/actors/testlib/test_runtime.cpp
+++ b/library/cpp/actors/testlib/test_runtime.cpp
@@ -735,7 +735,7 @@ namespace NActors {
}
node->LocalServicesActors[actorId] = cmd.Actor;
- node->LocalServices.push_back(std::make_pair(actorId, cmd));
+ node->LocalServices.push_back(std::make_pair(actorId, cmd));
}
void TTestActorRuntimeBase::InitNodes() {
@@ -1082,7 +1082,7 @@ namespace NActors {
auto mboxId = TEventMailboxId(edgeActor.NodeId(), edgeActor.Hint());
auto storeIt = Store.find(mboxId);
Y_VERIFY(storeIt == Store.end());
- storeIt = Store.insert(std::make_pair(mboxId, new TEventMailBox)).first;
+ storeIt = Store.insert(std::make_pair(mboxId, new TEventMailBox)).first;
storeIt->second->PushFront(events);
if (!events.empty())
HasEvents = true;
@@ -1113,10 +1113,10 @@ namespace NActors {
for (auto mailboxId : options.OnlyMailboxes) {
auto it = Mailboxes.find(mailboxId);
if (it == Mailboxes.end()) {
- it = Mailboxes.insert(std::make_pair(mailboxId, new TEventMailBox())).first;
+ it = Mailboxes.insert(std::make_pair(mailboxId, new TEventMailBox())).first;
}
- restrictedMailboxes.insert(std::make_pair(mailboxId, it->second));
+ restrictedMailboxes.insert(std::make_pair(mailboxId, it->second));
}
TAutoPtr<TTempEdgeEventsCaptor> tempEdgeEventsCaptor;
@@ -1720,7 +1720,7 @@ namespace NActors {
auto mboxId = TEventMailboxId(nodeId, hint);
auto it = Mailboxes.find(mboxId);
if (it == Mailboxes.end()) {
- it = Mailboxes.insert(std::make_pair(mboxId, new TEventMailBox())).first;
+ it = Mailboxes.insert(std::make_pair(mboxId, new TEventMailBox())).first;
}
return *it->second;
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 26e3b45c98..4184044e80 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -28,7 +28,7 @@
#include <util/system/thread.h>
#include <util/system/sanitizers.h>
#include <util/system/valgrind.h>
-#include <utility>
+#include <utility>
#include <functional>
diff --git a/library/cpp/binsaver/bin_saver.cpp b/library/cpp/binsaver/bin_saver.cpp
index fe0775af9f..465f123b35 100644
--- a/library/cpp/binsaver/bin_saver.cpp
+++ b/library/cpp/binsaver/bin_saver.cpp
@@ -29,7 +29,7 @@ void IBinSaver::StoreObject(IObjectBase* pObject) {
id = pFound->second;
else {
id = PtrIds->ysize() + 1;
- PtrIds->insert(std::make_pair(pObject, id));
+ PtrIds->insert(std::make_pair(pObject, id));
}
}
ptrId = id;
diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h
index 6dc997076d..503f11c4e6 100644
--- a/library/cpp/cache/cache.h
+++ b/library/cpp/cache/cache.h
@@ -6,7 +6,7 @@
#include <util/generic/hash_set.h>
#include <util/generic/vector.h>
#include <util/generic/yexception.h>
-#include <utility>
+#include <utility>
template <class TValue>
struct TUniformSizeProvider {
@@ -471,8 +471,8 @@ public:
return true;
}
- bool Insert(const std::pair<TKey, TValue>& p) {
- return Insert(p.first, p.second);
+ bool Insert(const std::pair<TKey, TValue>& p) {
+ return Insert(p.first, p.second);
}
bool Insert(const TKey& key, const TValue& value) {
@@ -551,13 +551,13 @@ protected:
bool MultiValue;
TIterator FindByItem(TItem* item) {
- std::pair<TIndexIterator, TIndexIterator> p = Index.equal_range(*item);
+ std::pair<TIndexIterator, TIndexIterator> p = Index.equal_range(*item);
// we have to delete the exact unlinked item (there may be multiple items for one key)
TIndexIterator it;
- for (it = p.first; it != p.second; ++it)
+ for (it = p.first; it != p.second; ++it)
if (&*it == item)
break;
- return (it == p.second ? End() : TIterator(it));
+ return (it == p.second ? End() : TIterator(it));
}
void EraseFromIndex(TItem* item) {
diff --git a/library/cpp/codecs/ut/codecs_ut.cpp b/library/cpp/codecs/ut/codecs_ut.cpp
index caf6089aef..87d95ef086 100644
--- a/library/cpp/codecs/ut/codecs_ut.cpp
+++ b/library/cpp/codecs/ut/codecs_ut.cpp
@@ -1219,7 +1219,7 @@ private:
{
THuffmanCodec codec;
- std::pair<char, ui64> freqs[256];
+ std::pair<char, ui64> freqs[256];
for (size_t i = 0; i < Y_ARRAY_SIZE(freqs); ++i) {
freqs[i].first = (char)i;
diff --git a/library/cpp/compproto/compproto_ut.cpp b/library/cpp/compproto/compproto_ut.cpp
index 9393be967a..89c309ab02 100644
--- a/library/cpp/compproto/compproto_ut.cpp
+++ b/library/cpp/compproto/compproto_ut.cpp
@@ -395,26 +395,26 @@ Y_UNIT_TEST_SUITE(CompProtoTestExtended) {
for (size_t i = 0; i < params.DataSize; ++i) {
meta.BeginElement(i, functor);
TMetaInfo<TMeta>& first = meta.BeginRepeated(2, functor);
- data[i].first.resize(params.ValueArraySize);
+ data[i].first.resize(params.ValueArraySize);
for (ui32 j = 0; j < params.ValueArraySize; j++) {
first.BeginElement(j, functor);
ui32 val = PseudoRandom(42 * 42 * 42);
first.SetScalar(0, val, functor);
- data[i].first[j] = val;
+ data[i].first[j] = val;
first.EndElement(functor);
}
first.EndRepeated(functor);
TMetaInfo<TMeta>& second = meta.BeginRepeated(3, functor);
- data[i].second.resize(params.ValueArraySize);
+ data[i].second.resize(params.ValueArraySize);
for (ui32 j = 0; j < params.ValueArraySize; j++) {
second.BeginElement(j, functor);
ui32 val = PseudoRandom(42 * 42 * 42);
second.SetScalar(0, val, functor);
- data[i].second[j] = val;
+ data[i].second[j] = val;
second.EndElement(functor);
}
@@ -493,10 +493,10 @@ Y_UNIT_TEST_SUITE(CompProtoTestExtended) {
State = InDataElemBeforeSecond;
break;
case InFirst:
- UNIT_ASSERT(element < data[DataInd].first.size());
+ UNIT_ASSERT(element < data[DataInd].first.size());
break;
case InSecond:
- UNIT_ASSERT(element < data[DataInd].second.size());
+ UNIT_ASSERT(element < data[DataInd].second.size());
break;
default:
Cerr << (ui32)State << Endl;
@@ -523,10 +523,10 @@ Y_UNIT_TEST_SUITE(CompProtoTestExtended) {
UNIT_ASSERT_EQUAL(index, 0);
switch (State) {
case InFirst:
- UNIT_ASSERT_EQUAL(val, data[DataInd].first[ArrayInd]);
+ UNIT_ASSERT_EQUAL(val, data[DataInd].first[ArrayInd]);
break;
case InSecond:
- UNIT_ASSERT_EQUAL(val, data[DataInd].second[ArrayInd]);
+ UNIT_ASSERT_EQUAL(val, data[DataInd].second[ArrayInd]);
break;
default:
UNIT_ASSERT(0);
diff --git a/library/cpp/compproto/huff.h b/library/cpp/compproto/huff.h
index fa5c139189..cb3dd982c4 100644
--- a/library/cpp/compproto/huff.h
+++ b/library/cpp/compproto/huff.h
@@ -5,7 +5,7 @@
#include <util/generic/ptr.h>
#include <util/generic/vector.h>
#include <util/generic/algorithm.h>
-#include <utility>
+#include <utility>
#include <queue>
diff --git a/library/cpp/containers/atomizer/atomizer.h b/library/cpp/containers/atomizer/atomizer.h
index 5e40f47ab9..b560d6d65d 100644
--- a/library/cpp/containers/atomizer/atomizer.h
+++ b/library/cpp/containers/atomizer/atomizer.h
@@ -5,7 +5,7 @@
#include <util/generic/vector.h>
#include <util/generic/utility.h>
-#include <utility>
+#include <utility>
#include <cstdio>
template <class HashFcn = THash<const char*>, class EqualTo = TEqualTo<const char*>>
@@ -45,7 +45,7 @@ public:
ui32 string_to_atom(const char* key) {
const char* old_begin = pool.Begin();
const char* old_end = pool.End();
- std::pair<iterator, bool> ins = insert_copy(key, ui32(size() + 1));
+ std::pair<iterator, bool> ins = insert_copy(key, ui32(size() + 1));
if (ins.second) { // new?
if (pool.Begin() != old_begin) // repoint?
for (TVector<const char*>::iterator ptr = order.begin(); ptr != order.end(); ++ptr)
@@ -58,7 +58,7 @@ public:
ui32 perm_string_to_atom(const char* key) {
value_type val(key, ui32(size() + 1));
- std::pair<iterator, bool> ins = this->insert(val);
+ std::pair<iterator, bool> ins = this->insert(val);
if (ins.second)
order.push_back((*ins.first).first); // == copy of 'key'
return (ui32)(*ins.first).second; // == size()+1
@@ -141,22 +141,22 @@ public:
ui32 string_to_atom(const char* key, const T* atom_data = NULL) {
const char* old_begin = pool.Begin();
const char* old_end = pool.End();
- std::pair<iterator, bool> ins = insert_copy(key, ui32(size() + 1));
+ std::pair<iterator, bool> ins = insert_copy(key, ui32(size() + 1));
if (ins.second) { // new?
if (pool.Begin() != old_begin) // repoint?
for (typename TOrder::iterator ptr = order.begin(); ptr != order.end(); ++ptr)
if (old_begin <= (*ptr).first && (*ptr).first < old_end) // from old pool?
(*ptr).first += pool.Begin() - old_begin;
- order.push_back(std::pair<const char*, T>((*ins.first).first, atom_data ? *atom_data : T()));
+ order.push_back(std::pair<const char*, T>((*ins.first).first, atom_data ? *atom_data : T()));
}
return (*ins.first).second;
}
ui32 perm_string_to_atom(const char* key, const T* atom_data = NULL) {
value_type val(key, ui32(size() + 1));
- std::pair<iterator, bool> ins = this->insert(val);
+ std::pair<iterator, bool> ins = this->insert(val);
if (ins.second)
- order.push_back(std::pair<const char*, T>((*ins.first).first, atom_data ? *atom_data : T()));
+ order.push_back(std::pair<const char*, T>((*ins.first).first, atom_data ? *atom_data : T()));
return (*ins.first).second; // == size()+1
}
ui32 find_atom(const char* key) const {
diff --git a/library/cpp/containers/comptrie/comptrie_trie.h b/library/cpp/containers/comptrie/comptrie_trie.h
index 40ec1e52b3..87588a611f 100644
--- a/library/cpp/containers/comptrie/comptrie_trie.h
+++ b/library/cpp/containers/comptrie/comptrie_trie.h
@@ -12,7 +12,7 @@
#include <util/generic/yexception.h>
#include <util/memory/blob.h>
#include <util/stream/input.h>
-#include <utility>
+#include <utility>
template <class T, class D, class S>
class TCompactTrieBuilder;
@@ -39,8 +39,8 @@ public:
typedef typename TCompactTrieKeySelector<TSymbol>::TKey TKey;
typedef typename TCompactTrieKeySelector<TSymbol>::TKeyBuf TKeyBuf;
- typedef std::pair<TKey, TData> TValueType;
- typedef std::pair<size_t, TData> TPhraseMatch;
+ typedef std::pair<TKey, TData> TValueType;
+ typedef std::pair<size_t, TData> TPhraseMatch;
typedef TVector<TPhraseMatch> TPhraseMatchVector;
typedef TCompactTrieBuilder<T, D, S> TBuilder;
diff --git a/library/cpp/containers/comptrie/comptrie_ut.cpp b/library/cpp/containers/comptrie/comptrie_ut.cpp
index 74bee09b5d..eefab1cb33 100644
--- a/library/cpp/containers/comptrie/comptrie_ut.cpp
+++ b/library/cpp/containers/comptrie/comptrie_ut.cpp
@@ -2,7 +2,7 @@
#include <library/cpp/testing/unittest/registar.h>
#include <util/stream/output.h>
-#include <utility>
+#include <utility>
#include <util/charset/wide.h>
#include <util/generic/algorithm.h>
@@ -1186,8 +1186,8 @@ void TCompactTrieTest::TestTrieWithContainers<std::pair<TUtf16String, TVector<i6
TCompactTrie<wchar16, TContainer> trie(TBlob::FromFileSingleThreaded(fileName));
for (size_t i = 0; i < keys.size(); i++) {
TContainer value = trie.Get(keys[i]);
- CheckEquality<TContainer::first_type>(value.first, sampleData[i].first);
- CheckEquality<TContainer::second_type>(value.second, sampleData[i].second);
+ CheckEquality<TContainer::first_type>(value.first, sampleData[i].first);
+ CheckEquality<TContainer::second_type>(value.second, sampleData[i].second);
}
unlink(fileName.data());
diff --git a/library/cpp/containers/flat_hash/lib/containers.h b/library/cpp/containers/flat_hash/lib/containers.h
index 82008f2f9c..322e38fbd2 100644
--- a/library/cpp/containers/flat_hash/lib/containers.h
+++ b/library/cpp/containers/flat_hash/lib/containers.h
@@ -101,7 +101,7 @@ public:
explicit TFlatContainer(size_type initSize, const allocator_type& alloc = {})
: Buckets_(initSize, alloc)
, Taken_(0)
- , Empty_(initSize) {}
+ , Empty_(initSize) {}
TFlatContainer(const TFlatContainer&) = default;
TFlatContainer(TFlatContainer&& rhs)
diff --git a/library/cpp/containers/sorted_vector/sorted_vector.h b/library/cpp/containers/sorted_vector/sorted_vector.h
index 123539af9e..93110940c1 100644
--- a/library/cpp/containers/sorted_vector/sorted_vector.h
+++ b/library/cpp/containers/sorted_vector/sorted_vector.h
@@ -6,7 +6,7 @@
#include <util/generic/algorithm.h>
#include <util/generic/mapfindptr.h>
#include <util/ysaveload.h>
-#include <utility>
+#include <utility>
#include <initializer_list>
@@ -127,12 +127,12 @@ namespace NSorted {
// if the value with the same key doesn't exist. Returns <iterator, bool> pair,
// where the first member is the pointer to the inserted/existing value, and the
// second member indicates either the value is inserted or not.
- inline std::pair<iterator, bool> InsertUnique(const value_type& value) {
+ inline std::pair<iterator, bool> InsertUnique(const value_type& value) {
iterator i = LowerBound(TKeyExtractor()(value));
if (i == TBase::end() || !TValueEqual()(*i, value))
- return std::pair<iterator, bool>(TBase::insert(i, value), true);
+ return std::pair<iterator, bool>(TBase::insert(i, value), true);
else
- return std::pair<iterator, bool>(i, false);
+ return std::pair<iterator, bool>(i, false);
}
// STL-compatible synonym
@@ -305,7 +305,7 @@ namespace NSorted {
template<class K>
inline void Erase(const K& key) {
- std::pair<iterator, iterator> res = EqualRange(key);
+ std::pair<iterator, iterator> res = EqualRange(key);
TBase::erase(res.first, res.second);
}
@@ -316,7 +316,7 @@ namespace NSorted {
template<class K>
inline size_t count(const K& key) const {
- const std::pair<const_iterator, const_iterator> range = this->EqualRange(key);
+ const std::pair<const_iterator, const_iterator> range = this->EqualRange(key);
return std::distance(range.first, range.second);
}
@@ -333,7 +333,7 @@ namespace NSorted {
public TMapOps<TSimpleMap<TKeyType, TValueType, TPredicate, A>>
{
private:
- typedef TSortedVector<std::pair<TKeyType, TValueType>, TKeyType, TSelect1st, TPredicate, A> TBase;
+ typedef TSortedVector<std::pair<TKeyType, TValueType>, TKeyType, TSelect1st, TPredicate, A> TBase;
public:
typedef typename TBase::value_type value_type;
diff --git a/library/cpp/containers/str_map/str_map.h b/library/cpp/containers/str_map/str_map.h
index 31b00d1b99..fca073a253 100644
--- a/library/cpp/containers/str_map/str_map.h
+++ b/library/cpp/containers/str_map/str_map.h
@@ -5,7 +5,7 @@
#include <util/generic/hash.h>
#include <util/generic/buffer.h>
#include <util/str_stl.h> // less<> and equal_to<> for const char*
-#include <utility>
+#include <utility>
#include <util/generic/noncopyable.h>
template <class T, class HashFcn = THash<const char*>, class EqualTo = TEqualTo<const char*>, class Alloc = std::allocator<const char*>>
@@ -15,9 +15,9 @@ template <class T, class HashFcn = THash<const char*>, class EqualTo = TEqualTo<
class segmented_string_hash;
template <class Map>
-inline std::pair<typename Map::iterator, bool>
+inline std::pair<typename Map::iterator, bool>
pool_insert(Map* m, const char* key, const typename Map::mapped_type& data, TBuffer& pool) {
- std::pair<typename Map::iterator, bool> ins = m->insert(typename Map::value_type(key, data));
+ std::pair<typename Map::iterator, bool> ins = m->insert(typename Map::value_type(key, data));
if (ins.second) { // new?
size_t buflen = strlen(key) + 1; // strlen???
const char* old_pool = pool.Begin();
@@ -55,7 +55,7 @@ public:
pool.Reserve(pool_size); // reserve here
}
- std::pair<iterator, bool> insert_copy(const char* key, const mapped_type& data) {
+ std::pair<iterator, bool> insert_copy(const char* key, const mapped_type& data) {
return ::pool_insert(this, key, data, pool);
}
@@ -122,8 +122,8 @@ public:
pool.alloc_first_seg();
}
- std::pair<iterator, bool> insert_copy(const C* key, size_t keylen, const mapped_type& data) {
- std::pair<iterator, bool> ins = this->insert(value_type(key, data));
+ std::pair<iterator, bool> insert_copy(const C* key, size_t keylen, const mapped_type& data) {
+ std::pair<iterator, bool> ins = this->insert(value_type(key, data));
if (ins.second) // new?
(const C*&)(*ins.first).first = pool.append(key, keylen);
return ins;
@@ -192,7 +192,7 @@ public:
{
}
- std::pair<iterator, bool> insert_copy(const char* key, const mapped_type& data) {
+ std::pair<iterator, bool> insert_copy(const char* key, const mapped_type& data) {
return Base::insert_copy(key, strlen(key) + 1, data);
}
diff --git a/library/cpp/dns/cache.cpp b/library/cpp/dns/cache.cpp
index 05c14e82fc..b7fbcf9fe1 100644
--- a/library/cpp/dns/cache.cpp
+++ b/library/cpp/dns/cache.cpp
@@ -68,7 +68,7 @@ namespace {
{
TWriteGuard guard(L_);
- std::pair<TCache::iterator, bool> updateResult = C_.insert(std::make_pair(TResolveInfo(res->Host, rt.Info.Port), res));
+ std::pair<TCache::iterator, bool> updateResult = C_.insert(std::make_pair(TResolveInfo(res->Host, rt.Info.Port), res));
TResolvedHost* rh = updateResult.first->second.Get();
if (updateResult.second) {
diff --git a/library/cpp/histogram/adaptive/block_histogram.h b/library/cpp/histogram/adaptive/block_histogram.h
index 266bb2f2b2..89e9702446 100644
--- a/library/cpp/histogram/adaptive/block_histogram.h
+++ b/library/cpp/histogram/adaptive/block_histogram.h
@@ -7,7 +7,7 @@
#include <util/generic/ptr.h>
#include <util/generic/vector.h>
-#include <utility>
+#include <utility>
namespace NKiwiAggr {
///////////////////
diff --git a/library/cpp/histogram/adaptive/common.h b/library/cpp/histogram/adaptive/common.h
index c0f7dfb26b..67994582ed 100644
--- a/library/cpp/histogram/adaptive/common.h
+++ b/library/cpp/histogram/adaptive/common.h
@@ -1,6 +1,6 @@
#pragma once
-#include <utility>
+#include <utility>
namespace NKiwiAggr {
using TWeightedValue = std::pair<double, double>; // value, weight
diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.h b/library/cpp/histogram/adaptive/fixed_bin_histogram.h
index bd380bd94a..ac3f879fd1 100644
--- a/library/cpp/histogram/adaptive/fixed_bin_histogram.h
+++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.h
@@ -6,7 +6,7 @@
#include <util/generic/ptr.h>
#include <util/generic/vector.h>
-#include <utility>
+#include <utility>
namespace NKiwiAggr {
class TFixedBinHistogram: private TNonCopyable, public IHistogram {
@@ -14,7 +14,7 @@ namespace NKiwiAggr {
static const size_t DEFAULT_TRAINING_SET_SIZE = 10000;
static const size_t DEFAULT_INTERVALS = 100;
- typedef std::pair<double, double> TWeightedValue; // value, weight
+ typedef std::pair<double, double> TWeightedValue; // value, weight
THolder<TVector<TWeightedValue>> TrainingSet;
size_t TrainingSetSize;
diff --git a/library/cpp/histogram/adaptive/multi_histogram.h b/library/cpp/histogram/adaptive/multi_histogram.h
index 41caac5ba6..0fb429cf4d 100644
--- a/library/cpp/histogram/adaptive/multi_histogram.h
+++ b/library/cpp/histogram/adaptive/multi_histogram.h
@@ -7,7 +7,7 @@
#include <util/generic/hash.h>
#include <util/generic/ptr.h>
-#include <utility>
+#include <utility>
namespace NKiwiAggr {
template <class TMyHistogram>
@@ -51,7 +51,7 @@ namespace NKiwiAggr {
void Add(ui64 id, double value, double weight) {
THistogramsMap::const_iterator it = Histograms.find(id);
if (it == Histograms.end()) {
- it = Histograms.insert(std::make_pair(id, IHistogramPtr(new TMyHistogram(Intervals, id)))).first;
+ it = Histograms.insert(std::make_pair(id, IHistogramPtr(new TMyHistogram(Intervals, id)))).first;
}
it->second->Add(value, weight);
}
diff --git a/library/cpp/http/io/headers_ut.cpp b/library/cpp/http/io/headers_ut.cpp
index 1d23ef8fdc..3e2eedb85e 100644
--- a/library/cpp/http/io/headers_ut.cpp
+++ b/library/cpp/http/io/headers_ut.cpp
@@ -1,7 +1,7 @@
#include <util/generic/set.h>
#include <util/generic/string.h>
#include <util/generic/strbuf.h>
-#include <utility>
+#include <utility>
#include <library/cpp/http/io/headers.h>
#include <library/cpp/testing/unittest/registar.h>
diff --git a/library/cpp/linear_regression/linear_regression.h b/library/cpp/linear_regression/linear_regression.h
index e57de5ff6c..4fc2e0e8f6 100644
--- a/library/cpp/linear_regression/linear_regression.h
+++ b/library/cpp/linear_regression/linear_regression.h
@@ -334,7 +334,7 @@ public:
TFeaturesTransformer Solve(const size_t iterationsCount = 100) {
TFeaturesTransformerLearner learner(TransformationType);
for (auto&& argumentWithBucket : Buckets) {
- const TBucket& bucket = argumentWithBucket.second;
+ const TBucket& bucket = argumentWithBucket.second;
learner.Add(bucket.ArgumentsMean.GetMean(), bucket.TargetsMean.GetMean());
}
return learner.Solve(iterationsCount);
diff --git a/library/cpp/messagebus/config/defs.h b/library/cpp/messagebus/config/defs.h
index 92b1df9969..88a49839f3 100644
--- a/library/cpp/messagebus/config/defs.h
+++ b/library/cpp/messagebus/config/defs.h
@@ -9,7 +9,7 @@
#include <util/generic/list.h>
-#include <utility>
+#include <utility>
// For historical reasons TCrawlerModule need to access
// APIs that should be private.
diff --git a/library/cpp/messagebus/session_impl.cpp b/library/cpp/messagebus/session_impl.cpp
index ddf9f360c4..28bac5058c 100644
--- a/library/cpp/messagebus/session_impl.cpp
+++ b/library/cpp/messagebus/session_impl.cpp
@@ -525,12 +525,12 @@ void TBusSessionImpl::SendSnapshotToStatusActor() {
void TBusSessionImpl::InsertConnectionLockAcquired(TRemoteConnection* connection) {
//Y_ASSERT(ConnectionsLock.IsLocked());
- Connections.insert(std::make_pair(connection->PeerAddrSocketAddr, connection));
+ Connections.insert(std::make_pair(connection->PeerAddrSocketAddr, connection));
// connection for given adds may already exist at this point
// (so we overwrite old connection)
// after reconnect, if previous connections wasn't shutdown yet
- bool inserted2 = ConnectionsById.insert(std::make_pair(connection->ConnectionId, connection)).second;
+ bool inserted2 = ConnectionsById.insert(std::make_pair(connection->ConnectionId, connection)).second;
Y_VERIFY(inserted2, "state check: must be inserted (2)");
SendSnapshotToStatusActor();
diff --git a/library/cpp/on_disk/chunks/chunks_ut.cpp b/library/cpp/on_disk/chunks/chunks_ut.cpp
index f727647f7f..4db05b52d8 100644
--- a/library/cpp/on_disk/chunks/chunks_ut.cpp
+++ b/library/cpp/on_disk/chunks/chunks_ut.cpp
@@ -175,8 +175,8 @@ public:
UNIT_ASSERT_EQUAL(reader.RealSize(), sizeof(ui64) + N * sizeof(int*));
}
}
- { /// std::pair<int, int>
- typedef std::pair<int, int> TItem;
+ { /// std::pair<int, int>
+ typedef std::pair<int, int> TItem;
const size_t N = 3;
TBufferStream stream;
{
diff --git a/library/cpp/packers/packers.h b/library/cpp/packers/packers.h
index 1bde1b59aa..cf72b96372 100644
--- a/library/cpp/packers/packers.h
+++ b/library/cpp/packers/packers.h
@@ -160,7 +160,7 @@ namespace NPackers {
ui64 val;
TIntegralPacker<ui64>().UnpackLeaf(p, val);
if (val & 1) {
- t = -1 * static_cast<i64>(val >> 1);
+ t = -1 * static_cast<i64>(val >> 1);
} else {
t = static_cast<T>(val >> 1);
}
@@ -441,13 +441,13 @@ namespace NPackers {
return value;
}
- // TPairPacker --- for std::pair<T1, T2> (any two types; can be nested)
+ // TPairPacker --- for std::pair<T1, T2> (any two types; can be nested)
// TPacker<T1> and TPacker<T2> should be valid classes
template <class T1, class T2, class TPacker1 = TPacker<T1>, class TPacker2 = TPacker<T2>>
class TPairPacker {
private:
- typedef std::pair<T1, T2> TMyPair;
+ typedef std::pair<T1, T2> TMyPair;
public:
void UnpackLeaf(const char* buffer, TMyPair& pair) const;
@@ -457,14 +457,14 @@ namespace NPackers {
};
template <class T1, class T2, class TPacker1, class TPacker2>
- inline void TPairPacker<T1, T2, TPacker1, TPacker2>::UnpackLeaf(const char* buffer, std::pair<T1, T2>& pair) const {
+ inline void TPairPacker<T1, T2, TPacker1, TPacker2>::UnpackLeaf(const char* buffer, std::pair<T1, T2>& pair) const {
TPacker1().UnpackLeaf(buffer, pair.first);
size_t size = TPacker1().SkipLeaf(buffer);
TPacker2().UnpackLeaf(buffer + size, pair.second);
}
template <class T1, class T2, class TPacker1, class TPacker2>
- inline void TPairPacker<T1, T2, TPacker1, TPacker2>::PackLeaf(char* buffer, const std::pair<T1, T2>& data, size_t size) const {
+ inline void TPairPacker<T1, T2, TPacker1, TPacker2>::PackLeaf(char* buffer, const std::pair<T1, T2>& data, size_t size) const {
size_t size1 = TPacker1().MeasureLeaf(data.first);
TPacker1().PackLeaf(buffer, data.first, size1);
size_t size2 = TPacker2().MeasureLeaf(data.second);
@@ -473,7 +473,7 @@ namespace NPackers {
}
template <class T1, class T2, class TPacker1, class TPacker2>
- inline size_t TPairPacker<T1, T2, TPacker1, TPacker2>::MeasureLeaf(const std::pair<T1, T2>& data) const {
+ inline size_t TPairPacker<T1, T2, TPacker1, TPacker2>::MeasureLeaf(const std::pair<T1, T2>& data) const {
size_t size1 = TPacker1().MeasureLeaf(data.first);
size_t size2 = TPacker2().MeasureLeaf(data.second);
return size1 + size2;
diff --git a/library/cpp/packers/ut/packers_ut.cpp b/library/cpp/packers/ut/packers_ut.cpp
index 18ce2150d1..58906defcb 100644
--- a/library/cpp/packers/ut/packers_ut.cpp
+++ b/library/cpp/packers/ut/packers_ut.cpp
@@ -1,7 +1,7 @@
#include <library/cpp/testing/unittest/registar.h>
#include <util/stream/output.h>
-#include <utility>
+#include <utility>
#include <util/charset/wide.h>
#include <util/generic/algorithm.h>
diff --git a/library/cpp/regex/pire/regexp.h b/library/cpp/regex/pire/regexp.h
index 94bba4064b..3e19dbcf6b 100644
--- a/library/cpp/regex/pire/regexp.h
+++ b/library/cpp/regex/pire/regexp.h
@@ -249,7 +249,7 @@ namespace NRegExp {
return NPire::ShortestPrefix(GetScanner(), b, e);
}
- typedef std::pair<const size_t*, const size_t*> TMatchedRegexps;
+ typedef std::pair<const size_t*, const size_t*> TMatchedRegexps;
inline TMatchedRegexps MatchedRegexps() const noexcept {
return GetScanner().AcceptedRegexps(GetState());
diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp
index 66001c4769..528fc9ad5c 100644
--- a/library/cpp/resource/registry.cpp
+++ b/library/cpp/resource/registry.cpp
@@ -18,7 +18,7 @@ namespace {
return ret;
}
- typedef std::pair<TStringBuf, TStringBuf> TDescriptor;
+ typedef std::pair<TStringBuf, TStringBuf> TDescriptor;
struct TStore: public IStore, public THashMap<TStringBuf, TDescriptor*> {
void Store(const TStringBuf key, const TStringBuf data) override {
diff --git a/library/cpp/scheme/scheme_cast.h b/library/cpp/scheme/scheme_cast.h
index 00839e8017..f8f0683564 100644
--- a/library/cpp/scheme/scheme_cast.h
+++ b/library/cpp/scheme/scheme_cast.h
@@ -61,11 +61,11 @@ namespace NJsonConverters {
template <class K, class L, class A>
void FromTValue(const NSc::TValue& x, TSet<K, L, A>& out, const bool validate);
- //std::pair
+ //std::pair
template <class T1, class T2>
- NSc::TValue ToTValue(const std::pair<T1, T2>& x);
+ NSc::TValue ToTValue(const std::pair<T1, T2>& x);
template <class T1, class T2>
- void FromTValue(const NSc::TValue& x, std::pair<T1, T2>& out, const bool validate);
+ void FromTValue(const NSc::TValue& x, std::pair<T1, T2>& out, const bool validate);
//////////////////////////////////////////////////////////////////////
// simple From, To helpers
@@ -168,7 +168,7 @@ namespace NJsonConverters {
for (const auto& it : dict) {
TKey key = NJsonConverters::FromString<TKey>(it.first, validate);
TMapped val = NJsonConverters::FromTValue<TMapped>(it.second, validate);
- out.insert(std::pair<TKey, TMapped>(key, val));
+ out.insert(std::pair<TKey, TMapped>(key, val));
}
}
}
@@ -278,7 +278,7 @@ namespace NJsonConverters {
// std::pair
//////////////////////////////////////////////////////////////////////
template <class T1, class T2>
- NSc::TValue ToTValue(const std::pair<T1, T2>& x) {
+ NSc::TValue ToTValue(const std::pair<T1, T2>& x) {
NSc::TValue out;
out.SetArray();
out.Push(NJsonConverters::ToTValue(x.first));
@@ -287,7 +287,7 @@ namespace NJsonConverters {
}
template <class T1, class T2>
- void FromTValue(const NSc::TValue& x, std::pair<T1, T2>& out, const bool validate) {
+ void FromTValue(const NSc::TValue& x, std::pair<T1, T2>& out, const bool validate) {
if (validate)
Y_ENSURE(x.IsArray() || x.IsNull(), "not valid input scheme");
if (x.IsArray()) {
diff --git a/library/cpp/string_utils/levenshtein_diff/levenshtein_diff.h b/library/cpp/string_utils/levenshtein_diff/levenshtein_diff.h
index 8a240bfed8..ef0c46081a 100644
--- a/library/cpp/string_utils/levenshtein_diff/levenshtein_diff.h
+++ b/library/cpp/string_utils/levenshtein_diff/levenshtein_diff.h
@@ -6,7 +6,7 @@
#include <util/system/yassert.h>
#include <type_traits>
-#include <utility>
+#include <utility>
namespace NLevenshtein {
enum EEditMoveType {
@@ -84,7 +84,7 @@ namespace NLevenshtein {
for (int i = 1; i <= l1; i++) {
for (int j = 1; j <= l2; j++) {
if (str1[i - 1] == str2[j - 1]) {
- ma[i][j] = std::make_pair(ma[i - 1][j - 1].first, EMT_PRESERVE);
+ ma[i][j] = std::make_pair(ma[i - 1][j - 1].first, EMT_PRESERVE);
} else {
const TWeightType replaceWeight = replaceWeigher(str1[i - 1], str2[j - 1]);
Y_ASSERT(replaceWeight >= 0);
diff --git a/library/cpp/threading/task_scheduler/task_scheduler.cpp b/library/cpp/threading/task_scheduler/task_scheduler.cpp
index 174dde4bf7..fdc160cf05 100644
--- a/library/cpp/threading/task_scheduler/task_scheduler.cpp
+++ b/library/cpp/threading/task_scheduler/task_scheduler.cpp
@@ -102,7 +102,7 @@ bool TTaskScheduler::Add(ITaskRef task, TInstant expire) {
with_lock (Lock_) {
if (!IsStopped_ && Workers_.size() > 0 && GetTaskCount() + 1 <= MaxTaskCount_) {
ITaskRef newTask = new TTaskWrapper(task, TaskCounter_);
- Queue_.insert(std::make_pair(expire, TTaskHolder(newTask)));
+ Queue_.insert(std::make_pair(expire, TTaskHolder(newTask)));
if (!Queue_.begin()->second.WaitingWorker) {
CondVar_.Signal();
@@ -216,7 +216,7 @@ void TTaskScheduler::WorkerFunc(TWorkerThread* thread) {
if (!!toDo) {
if (repeat < TInstant::Max()) {
- Queue_.insert(std::make_pair(repeat, TTaskHolder(toDo)));
+ Queue_.insert(std::make_pair(repeat, TTaskHolder(toDo)));
}
}
diff --git a/library/cpp/unicode/normalization/generated/decomposition.cpp b/library/cpp/unicode/normalization/generated/decomposition.cpp
index 9ac6a5f92a..1c8d5f5594 100644
--- a/library/cpp/unicode/normalization/generated/decomposition.cpp
+++ b/library/cpp/unicode/normalization/generated/decomposition.cpp
@@ -1,7 +1,7 @@
#include <library/cpp/unicode/normalization/decomposition_table.h>
namespace { namespace NCannonDecompositionTableGenerated {
- using TV = const NUnicode::NPrivate::TDecompositionTable::TStored;
+ using TV = const NUnicode::NPrivate::TDecompositionTable::TStored;
static const TV V = {
#undef V0
@@ -42605,7 +42605,7 @@ namespace NUnicode {
} // namespace NUnicode
namespace { namespace NCompatDecompositionTableGenerated {
- using TV = const NUnicode::NPrivate::TDecompositionTable::TStored;
+ using TV = const NUnicode::NPrivate::TDecompositionTable::TStored;
static const TV V = {
#undef V0
diff --git a/library/cpp/unicode/normalization/normalization.h b/library/cpp/unicode/normalization/normalization.h
index 4f5f57881c..79fe1396b0 100644
--- a/library/cpp/unicode/normalization/normalization.h
+++ b/library/cpp/unicode/normalization/normalization.h
@@ -9,7 +9,7 @@
#include <util/generic/algorithm.h>
#include <util/generic/singleton.h>
#include <util/generic/noncopyable.h>
-#include <utility>
+#include <utility>
namespace NUnicode {
enum ENormalization {
@@ -95,7 +95,7 @@ namespace NUnicode {
class TKey: public std::pair<wchar32, wchar32> {
public:
inline TKey(wchar32 a, wchar32 b)
- : std::pair<wchar32, wchar32>(a, b)
+ : std::pair<wchar32, wchar32>(a, b)
{
}
@@ -126,7 +126,7 @@ namespace NUnicode {
}
};
- typedef std::pair<wchar32, TCombining> TSymbol;
+ typedef std::pair<wchar32, TCombining> TSymbol;
typedef TVector<TSymbol> TBuffer;
template <bool doCompose>
diff --git a/tools/ya.make b/tools/ya.make
index 51a6b8b426..609ff8879b 100644
--- a/tools/ya.make
+++ b/tools/ya.make
@@ -168,7 +168,7 @@ RECURSE(
unpackrrr
unpack_staff_cert
untranslit_test
- untranslit_test/tests
+ untranslit_test/tests
url
urlmenuindexer
urlseq_print
diff --git a/util/charset/benchmark/utf8_to_wide/main.cpp b/util/charset/benchmark/utf8_to_wide/main.cpp
index 09fa567fe5..7683b4dd15 100644
--- a/util/charset/benchmark/utf8_to_wide/main.cpp
+++ b/util/charset/benchmark/utf8_to_wide/main.cpp
@@ -19,33 +19,33 @@ namespace {
}
};
- template <size_t N>
+ template <size_t N>
struct TRandomRuString: public TVector<char> {
- inline TRandomRuString() {
+ inline TRandomRuString() {
TVector<unsigned char> data(N * 2);
- unsigned char* textEnd = data.begin();
- for (size_t i = 0; i < N; ++i) {
- size_t runeLen;
+ unsigned char* textEnd = data.begin();
+ for (size_t i = 0; i < N; ++i) {
+ size_t runeLen;
WriteUTF8Char(RandomNumber<ui32>(0x7FF) + 1, runeLen, textEnd);
- textEnd += runeLen;
- }
- assign(reinterpret_cast<const char*>(data.begin()), reinterpret_cast<const char*>(textEnd));
- }
- };
-
+ textEnd += runeLen;
+ }
+ assign(reinterpret_cast<const char*>(data.begin()), reinterpret_cast<const char*>(textEnd));
+ }
+ };
+
using RAS1 = TRandomAsciiString<1>;
using RAS10 = TRandomAsciiString<10>;
using RAS50 = TRandomAsciiString<50>;
using RAS1000 = TRandomAsciiString<1000>;
using RAS1000000 = TRandomAsciiString<1000000>;
-
- using RRS1 = TRandomRuString<1>;
- using RRS10 = TRandomRuString<10>;
- using RRS1000 = TRandomRuString<1000>;
- using RRS1000000 = TRandomRuString<1000000>;
+
+ using RRS1 = TRandomRuString<1>;
+ using RRS10 = TRandomRuString<10>;
+ using RRS1000 = TRandomRuString<1000>;
+ using RRS1000000 = TRandomRuString<1000000>;
}
-#ifdef _sse2_
+#ifdef _sse2_
#define IS_ASCII_BENCHMARK(length) \
Y_CPU_BENCHMARK(IsStringASCII##length, iface) { \
const auto& data = *Singleton<RAS##length>(); \
@@ -65,7 +65,7 @@ namespace {
Y_DO_NOT_OPTIMIZE_AWAY(::NDetail::DoIsStringASCIISSE(reinterpret_cast<const unsigned char*>(data.begin()), reinterpret_cast<const unsigned char*>(data.end()))); \
} \
}
-#else //no sse
+#else //no sse
#define IS_ASCII_BENCHMARK(length) \
Y_CPU_BENCHMARK(IsStringASCIIScalar##length, iface) { \
const auto& data = *Singleton<RAS##length>(); \
@@ -79,33 +79,33 @@ namespace {
Y_DO_NOT_OPTIMIZE_AWAY(::NDetail::DoIsStringASCIISlow(data.begin(), data.end())); \
} \
}
-#endif
-
-IS_ASCII_BENCHMARK(1);
-IS_ASCII_BENCHMARK(10);
-IS_ASCII_BENCHMARK(50);
-IS_ASCII_BENCHMARK(1000);
-IS_ASCII_BENCHMARK(1000000);
-
-template <bool robust, typename TCharType>
-inline size_t UTF8ToWideImplScalar(const char* text, size_t len, TCharType* dest, size_t& written) {
- const unsigned char* cur = reinterpret_cast<const unsigned char*>(text);
- const unsigned char* last = cur + len;
- TCharType* p = dest;
-
- ::NDetail::UTF8ToWideImplScalar<robust>(cur, last, p);
- written = p - dest;
- return cur - reinterpret_cast<const unsigned char*>(text);
-}
-
-template <bool robust, typename TCharType>
-inline size_t UTF8ToWideImplSSE(const char* text, size_t len, TCharType* dest, size_t& written) {
- return UTF8ToWideImpl(text, len, dest, written);
-}
-
+#endif
+
+IS_ASCII_BENCHMARK(1);
+IS_ASCII_BENCHMARK(10);
+IS_ASCII_BENCHMARK(50);
+IS_ASCII_BENCHMARK(1000);
+IS_ASCII_BENCHMARK(1000000);
+
+template <bool robust, typename TCharType>
+inline size_t UTF8ToWideImplScalar(const char* text, size_t len, TCharType* dest, size_t& written) {
+ const unsigned char* cur = reinterpret_cast<const unsigned char*>(text);
+ const unsigned char* last = cur + len;
+ TCharType* p = dest;
+
+ ::NDetail::UTF8ToWideImplScalar<robust>(cur, last, p);
+ written = p - dest;
+ return cur - reinterpret_cast<const unsigned char*>(text);
+}
+
+template <bool robust, typename TCharType>
+inline size_t UTF8ToWideImplSSE(const char* text, size_t len, TCharType* dest, size_t& written) {
+ return UTF8ToWideImpl(text, len, dest, written);
+}
+
static wchar16 WBUF_UTF16[10000000];
static wchar32 WBUF_UTF32[10000000];
-
+
#define UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(impl, length, to) \
Y_CPU_BENCHMARK(UTF8ToWideASCII##impl##length##to, iface) { \
const auto& data = *Singleton<RAS##length>(); \
@@ -113,8 +113,8 @@ static wchar32 WBUF_UTF32[10000000];
size_t written = 0; \
Y_DO_NOT_OPTIMIZE_AWAY(UTF8ToWideImpl##impl<false>(data.begin(), data.size(), WBUF_##to, written)); \
} \
- }
-
+ }
+
#define UTF8_TO_WIDE_SCALAR_BENCHMARK_RU(impl, length, to) \
Y_CPU_BENCHMARK(UTF8ToWideRU##impl##length##to, iface) { \
const auto& data = *Singleton<RRS##length>(); \
@@ -122,8 +122,8 @@ static wchar32 WBUF_UTF32[10000000];
size_t written = 0; \
Y_DO_NOT_OPTIMIZE_AWAY(UTF8ToWideImpl##impl<false>(data.begin(), data.size(), WBUF_##to, written)); \
} \
- }
-
+ }
+
UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(Scalar, 1, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(SSE, 1, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(Scalar, 10, UTF16);
@@ -132,7 +132,7 @@ UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(Scalar, 1000, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(SSE, 1000, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(Scalar, 1000000, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_ASCII(SSE, 1000000, UTF16);
-
+
UTF8_TO_WIDE_SCALAR_BENCHMARK_RU(Scalar, 1, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_RU(SSE, 1, UTF16);
UTF8_TO_WIDE_SCALAR_BENCHMARK_RU(Scalar, 10, UTF16);
diff --git a/util/charset/generated/unidata.cpp b/util/charset/generated/unidata.cpp
index 6f5adbbc0a..27579cab8a 100644
--- a/util/charset/generated/unidata.cpp
+++ b/util/charset/generated/unidata.cpp
@@ -7530,9 +7530,9 @@ namespace NUnicode {
}
} // namespace NPrivate
} // namespace NUnicode
-namespace NUnicode {
- namespace NPrivate {
- const size_t DEFAULT_KEY = 0xE001;
- static_assert(NUnidataTableGenerated::Size > DEFAULT_KEY, "table size should be greater then default key");
- }
-}
+namespace NUnicode {
+ namespace NPrivate {
+ const size_t DEFAULT_KEY = 0xE001;
+ static_assert(NUnidataTableGenerated::Size > DEFAULT_KEY, "table size should be greater then default key");
+ }
+}
diff --git a/util/charset/unicode_table.h b/util/charset/unicode_table.h
index 9e171b2583..80f88a0ba5 100644
--- a/util/charset/unicode_table.h
+++ b/util/charset/unicode_table.h
@@ -88,10 +88,10 @@ namespace NUnicodeTable {
return TImpl::Get(val);
}
- inline TValueRef Get(size_t key) const {
- return GetImpl(key);
- }
-
+ inline TValueRef Get(size_t key) const {
+ return GetImpl(key);
+ }
+
public:
TTable(TData data, size_t size)
: Data(data)
diff --git a/util/charset/unidata.h b/util/charset/unidata.h
index 400d314186..a407d1a227 100644
--- a/util/charset/unidata.h
+++ b/util/charset/unidata.h
@@ -110,13 +110,13 @@ namespace NUnicode {
TCombining Combining;
};
- extern const size_t DEFAULT_KEY;
-
+ extern const size_t DEFAULT_KEY;
+
using TUnidataTable = NUnicodeTable::TTable<NUnicodeTable::TSubtable<NUnicodeTable::UNICODE_TABLE_SHIFT, NUnicodeTable::TValues<TProperty>>>;
const TUnidataTable& UnidataTable();
inline const TProperty& CharProperty(wchar32 ch) {
- return UnidataTable().Get(ch, DEFAULT_KEY);
+ return UnidataTable().Get(ch, DEFAULT_KEY);
}
inline ui32 CharInfo(wchar32 ch) {
diff --git a/util/charset/utf8.h b/util/charset/utf8.h
index 5039b46ae9..9b4c9a05b0 100644
--- a/util/charset/utf8.h
+++ b/util/charset/utf8.h
@@ -16,24 +16,24 @@ inline unsigned char UTF8LeadByteMask(size_t utf8_rune_len) {
}
inline size_t UTF8RuneLen(const unsigned char lead_byte) {
- //b0XXXXXXX
- if ((lead_byte & 0x80) == 0x00) {
- return 1;
- }
- //b110XXXXX
- if ((lead_byte & 0xe0) == 0xc0) {
- return 2;
- }
- //b1110XXXX
- if ((lead_byte & 0xf0) == 0xe0) {
- return 3;
- }
- //b11110XXX
- if ((lead_byte & 0xf8) == 0xf0) {
- return 4;
- }
- //b10XXXXXX
- return 0;
+ //b0XXXXXXX
+ if ((lead_byte & 0x80) == 0x00) {
+ return 1;
+ }
+ //b110XXXXX
+ if ((lead_byte & 0xe0) == 0xc0) {
+ return 2;
+ }
+ //b1110XXXX
+ if ((lead_byte & 0xf0) == 0xe0) {
+ return 3;
+ }
+ //b11110XXX
+ if ((lead_byte & 0xf8) == 0xf0) {
+ return 4;
+ }
+ //b10XXXXXX
+ return 0;
}
inline size_t UTF8RuneLenByUCS(wchar32 rune) {
diff --git a/util/charset/utf8_ut.cpp b/util/charset/utf8_ut.cpp
index 9e68881cca..8eadb3f808 100644
--- a/util/charset/utf8_ut.cpp
+++ b/util/charset/utf8_ut.cpp
@@ -108,19 +108,19 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) {
UNIT_ASSERT_EXCEPTION(UTF8ToWide(text), yexception);
}
}
-
+
Y_UNIT_TEST(TestUTF8ToWideScalar) {
TFileInput in(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/test1.txt"));
-
+
TString text = in.ReadAll();
TUtf16String wtextSSE = UTF8ToWide(text);
TUtf16String wtextScalar = TUtf16String::Uninitialized(text.size());
- const unsigned char* textBegin = reinterpret_cast<const unsigned char*>(text.c_str());
- wchar16* wtextBegin = wtextScalar.begin();
- ::NDetail::UTF8ToWideImplScalar<false>(textBegin, textBegin + text.size(), wtextBegin);
- UNIT_ASSERT(wtextBegin == wtextScalar.begin() + wtextSSE.size());
- UNIT_ASSERT(textBegin == reinterpret_cast<const unsigned char*>(text.end()));
- wtextScalar.remove(wtextSSE.size());
- UNIT_ASSERT(wtextScalar == wtextSSE);
- }
+ const unsigned char* textBegin = reinterpret_cast<const unsigned char*>(text.c_str());
+ wchar16* wtextBegin = wtextScalar.begin();
+ ::NDetail::UTF8ToWideImplScalar<false>(textBegin, textBegin + text.size(), wtextBegin);
+ UNIT_ASSERT(wtextBegin == wtextScalar.begin() + wtextSSE.size());
+ UNIT_ASSERT(textBegin == reinterpret_cast<const unsigned char*>(text.end()));
+ wtextScalar.remove(wtextSSE.size());
+ UNIT_ASSERT(wtextScalar == wtextSSE);
+ }
}
diff --git a/util/charset/wide.h b/util/charset/wide.h
index 04e6928aab..8e41529842 100644
--- a/util/charset/wide.h
+++ b/util/charset/wide.h
@@ -13,12 +13,12 @@
#include <util/system/cpu_id.h>
#include <util/system/yassert.h>
-#include <cstring>
-
-#ifdef _sse2_
+#include <cstring>
+
+#ifdef _sse2_
#include <emmintrin.h>
-#endif
-
+#endif
+
template <class T>
class TTempArray;
using TCharTemp = TTempArray<wchar16>;
@@ -258,26 +258,26 @@ public:
}
};
-namespace NDetail {
- template <bool robust, typename TCharType>
+namespace NDetail {
+ template <bool robust, typename TCharType>
inline void UTF8ToWideImplScalar(const unsigned char*& cur, const unsigned char* last, TCharType*& dest) noexcept {
- wchar32 rune = BROKEN_RUNE;
-
- while (cur != last) {
- if (ReadUTF8CharAndAdvance(rune, cur, last) != RECODE_OK) {
- if (robust) {
- rune = BROKEN_RUNE;
- ++cur;
- } else {
- break;
- }
- }
-
- Y_ASSERT(cur <= last);
- WriteSymbol(rune, dest);
- }
- }
-
+ wchar32 rune = BROKEN_RUNE;
+
+ while (cur != last) {
+ if (ReadUTF8CharAndAdvance(rune, cur, last) != RECODE_OK) {
+ if (robust) {
+ rune = BROKEN_RUNE;
+ ++cur;
+ } else {
+ break;
+ }
+ }
+
+ Y_ASSERT(cur <= last);
+ WriteSymbol(rune, dest);
+ }
+ }
+
template <typename TCharType>
inline void UTF16ToUTF32ImplScalar(const wchar16* cur, const wchar16* last, TCharType*& dest) noexcept {
wchar32 rune = BROKEN_RUNE;
@@ -289,28 +289,28 @@ namespace NDetail {
}
}
- template <class TCharType>
- inline void UTF8ToWideImplSSE41(const unsigned char*& /*cur*/, const unsigned char* /*last*/, TCharType*& /*dest*/) noexcept {
- }
-
- void UTF8ToWideImplSSE41(const unsigned char*& cur, const unsigned char* last, wchar16*& dest) noexcept;
+ template <class TCharType>
+ inline void UTF8ToWideImplSSE41(const unsigned char*& /*cur*/, const unsigned char* /*last*/, TCharType*& /*dest*/) noexcept {
+ }
+
+ void UTF8ToWideImplSSE41(const unsigned char*& cur, const unsigned char* last, wchar16*& dest) noexcept;
void UTF8ToWideImplSSE41(const unsigned char*& cur, const unsigned char* last, wchar32*& dest) noexcept;
}
-
+
//! @return len if robust and position where encoding stopped if not
template <bool robust, typename TCharType>
inline size_t UTF8ToWideImpl(const char* text, size_t len, TCharType* dest, size_t& written) noexcept {
const unsigned char* cur = reinterpret_cast<const unsigned char*>(text);
- const unsigned char* last = cur + len;
+ const unsigned char* last = cur + len;
TCharType* p = dest;
-#ifdef _sse_ //can't check for sse4, as we build most of arcadia without sse4 support even on platforms that support it
- if (cur + 16 <= last && NX86::CachedHaveSSE41()) {
- ::NDetail::UTF8ToWideImplSSE41(cur, last, p);
- }
-#endif
+#ifdef _sse_ //can't check for sse4, as we build most of arcadia without sse4 support even on platforms that support it
+ if (cur + 16 <= last && NX86::CachedHaveSSE41()) {
+ ::NDetail::UTF8ToWideImplSSE41(cur, last, p);
+ }
+#endif
- ::NDetail::UTF8ToWideImplScalar<robust>(cur, last, p);
+ ::NDetail::UTF8ToWideImplScalar<robust>(cur, last, p);
written = p - dest;
return cur - reinterpret_cast<const unsigned char*>(text);
}
@@ -510,22 +510,22 @@ namespace NDetail {
};
template <typename TChar>
- inline bool DoIsStringASCIISlow(const TChar* first, const TChar* last) {
+ inline bool DoIsStringASCIISlow(const TChar* first, const TChar* last) {
using TUnsignedChar = std::make_unsigned_t<TChar>;
- Y_ASSERT(first <= last);
- for (; first != last; ++first) {
- if (static_cast<TUnsignedChar>(*first) > 0x7F) {
- return false;
- }
- }
- return true;
- }
-
- template <typename TChar>
+ Y_ASSERT(first <= last);
+ for (; first != last; ++first) {
+ if (static_cast<TUnsignedChar>(*first) > 0x7F) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template <typename TChar>
inline bool DoIsStringASCII(const TChar* first, const TChar* last) {
- if (last - first < 10) {
- return DoIsStringASCIISlow(first, last);
- }
+ if (last - first < 10) {
+ return DoIsStringASCIISlow(first, last);
+ }
TMachineWord allCharBits = 0;
TMachineWord nonAsciiBitMask = NonASCIIMask<sizeof(TMachineWord), TChar>::Value();
@@ -557,40 +557,40 @@ namespace NDetail {
return !(allCharBits & nonAsciiBitMask);
}
-#ifdef _sse2_
- inline bool DoIsStringASCIISSE(const unsigned char* first, const unsigned char* last) {
- //scalar version for short strings
- if (first + 8 > last) {
- return ::NDetail::DoIsStringASCIISlow(first, last);
- }
-
- alignas(16) unsigned char buf[16];
-
- while (first + 16 <= last) {
- memcpy(buf, first, 16);
- __m128i chunk = _mm_load_si128(reinterpret_cast<__m128i*>(buf));
-
- int asciiMask = _mm_movemask_epi8(chunk);
- if (asciiMask) {
+#ifdef _sse2_
+ inline bool DoIsStringASCIISSE(const unsigned char* first, const unsigned char* last) {
+ //scalar version for short strings
+ if (first + 8 > last) {
+ return ::NDetail::DoIsStringASCIISlow(first, last);
+ }
+
+ alignas(16) unsigned char buf[16];
+
+ while (first + 16 <= last) {
+ memcpy(buf, first, 16);
+ __m128i chunk = _mm_load_si128(reinterpret_cast<__m128i*>(buf));
+
+ int asciiMask = _mm_movemask_epi8(chunk);
+ if (asciiMask) {
return false;
}
- first += 16;
+ first += 16;
}
-
- if (first + 8 <= last) {
- memcpy(buf, first, 8);
- __m128i chunk = _mm_loadl_epi64(reinterpret_cast<__m128i*>(buf));
-
- int asciiMask = _mm_movemask_epi8(chunk);
- if (asciiMask) {
- return false;
- }
- first += 8;
- }
-
- return ::NDetail::DoIsStringASCIISlow(first, last);
+
+ if (first + 8 <= last) {
+ memcpy(buf, first, 8);
+ __m128i chunk = _mm_loadl_epi64(reinterpret_cast<__m128i*>(buf));
+
+ int asciiMask = _mm_movemask_epi8(chunk);
+ if (asciiMask) {
+ return false;
+ }
+ first += 8;
+ }
+
+ return ::NDetail::DoIsStringASCIISlow(first, last);
}
-#endif //_sse2_
+#endif //_sse2_
}
@@ -600,17 +600,17 @@ inline bool IsStringASCII(const TChar* first, const TChar* last) {
return ::NDetail::DoIsStringASCII(first, last);
}
-#ifdef _sse2_
-template <>
-inline bool IsStringASCII<unsigned char>(const unsigned char* first, const unsigned char* last) {
- return ::NDetail::DoIsStringASCIISSE(first, last);
-}
-template <>
-inline bool IsStringASCII<char>(const char* first, const char* last) {
- return ::NDetail::DoIsStringASCIISSE(reinterpret_cast<const unsigned char*>(first), reinterpret_cast<const unsigned char*>(last));
-}
-#endif
-
+#ifdef _sse2_
+template <>
+inline bool IsStringASCII<unsigned char>(const unsigned char* first, const unsigned char* last) {
+ return ::NDetail::DoIsStringASCIISSE(first, last);
+}
+template <>
+inline bool IsStringASCII<char>(const char* first, const char* last) {
+ return ::NDetail::DoIsStringASCIISSE(reinterpret_cast<const unsigned char*>(first), reinterpret_cast<const unsigned char*>(last));
+}
+#endif
+
//! copies elements from one character sequence to another using memcpy
//! for compatibility only
template <typename TChar>
diff --git a/util/charset/wide_sse41.cpp b/util/charset/wide_sse41.cpp
index d1f2a74851..6859e9c44c 100644
--- a/util/charset/wide_sse41.cpp
+++ b/util/charset/wide_sse41.cpp
@@ -1,6 +1,6 @@
-#include <util/charset/wide.h>
+#include <util/charset/wide.h>
#include <util/system/types.h>
-
+
#ifdef SSE41_STUB
namespace NDetail {
@@ -13,21 +13,21 @@ namespace NDetail {
#else
#include <util/system/compiler.h>
-
+
#include <cstring>
#include <emmintrin.h>
#include <smmintrin.h>
-
-//processes to the first error, or until less then 16 bytes left
-//most code taken from https://woboq.com/blog/utf-8-processing-using-simd.html
-
+
+//processes to the first error, or until less then 16 bytes left
+//most code taken from https://woboq.com/blog/utf-8-processing-using-simd.html
+
//return dstAdvance 0 in case of problems
static Y_FORCE_INLINE ui32 Unpack16BytesIntoUtf16IfNoSurrogats(const unsigned char*& cur, __m128i& utf16Low, __m128i& utf16High) {
unsigned char curAligned[16];
-
+
memcpy(curAligned, cur, sizeof(__m128i));
__m128i chunk = _mm_load_si128(reinterpret_cast<const __m128i*>(curAligned));
-
+
//only ascii characters - simple copy
if (!_mm_movemask_epi8(chunk)) {
utf16Low = _mm_unpacklo_epi8(chunk, _mm_setzero_si128());
@@ -35,68 +35,68 @@ static Y_FORCE_INLINE ui32 Unpack16BytesIntoUtf16IfNoSurrogats(const unsigned ch
cur += 16;
return 16;
}
-
+
__m128i chunkSigned = _mm_add_epi8(chunk, _mm_set1_epi8(0x80));
__m128i isAsciiMask = _mm_cmpgt_epi8(chunk, _mm_set1_epi8(0));
-
+
__m128i cond2 = _mm_cmplt_epi8(_mm_set1_epi8(0xc2 - 1 - 0x80), chunkSigned);
__m128i state = _mm_set1_epi8(0x0 | (char)0x80);
-
+
__m128i cond3 = _mm_cmplt_epi8(_mm_set1_epi8(0xe0 - 1 - 0x80), chunkSigned);
state = _mm_blendv_epi8(state, _mm_set1_epi8(0x2 | (char)0xc0), cond2);
-
+
int sourceAdvance;
__m128i shifts;
__m128i chunkLow, chunkHigh;
-
+
if (Y_LIKELY(!_mm_movemask_epi8(cond3))) {
//main case: no bloks of size 3 or 4
-
+
//rune len for start of multi-byte sequences (0 for b0... and b10..., 2 for b110..., etc.)
__m128i count = _mm_and_si128(state, _mm_set1_epi8(0x7));
-
+
__m128i countSub1 = _mm_subs_epu8(count, _mm_set1_epi8(0x1));
-
+
shifts = countSub1;
__m128i continuation1 = _mm_slli_si128(countSub1, 1);
-
+
shifts = _mm_add_epi8(shifts, _mm_slli_si128(shifts, 1));
shifts = _mm_add_epi8(shifts, _mm_slli_si128(shifts, 2));
-
+
__m128i counts = _mm_or_si128(count, continuation1);
-
+
__m128i isBeginMultibyteMask = _mm_cmpgt_epi8(count, _mm_set1_epi8(0));
__m128i needNoContinuationMask = _mm_cmpeq_epi8(continuation1, _mm_set1_epi8(0));
__m128i isBeginMask = _mm_add_epi8(isBeginMultibyteMask, isAsciiMask);
//each symbol should be exactly one of ascii, continuation or begin
__m128i okMask = _mm_cmpeq_epi8(isBeginMask, needNoContinuationMask);
-
+
if (_mm_movemask_epi8(okMask) != 0xFFFF) {
return 0;
}
-
+
shifts = _mm_add_epi8(shifts, _mm_slli_si128(shifts, 4));
-
+
__m128i mask = _mm_and_si128(state, _mm_set1_epi8(0xf8));
shifts = _mm_add_epi8(shifts, _mm_slli_si128(shifts, 8));
-
+
chunk = _mm_andnot_si128(mask, chunk); // from now on, we only have usefull bits
shifts = _mm_and_si128(shifts, _mm_cmplt_epi8(counts, _mm_set1_epi8(2))); // <=1
-
+
__m128i chunk_right = _mm_slli_si128(chunk, 1);
shifts = _mm_blendv_epi8(shifts, _mm_srli_si128(shifts, 1),
_mm_srli_si128(_mm_slli_epi16(shifts, 7), 1));
-
+
chunkLow = _mm_blendv_epi8(chunk,
_mm_or_si128(chunk, _mm_and_si128(_mm_slli_epi16(chunk_right, 6), _mm_set1_epi8(0xc0))),
_mm_cmpeq_epi8(counts, _mm_set1_epi8(1)));
-
+
chunkHigh = _mm_and_si128(chunk, _mm_cmpeq_epi8(counts, _mm_set1_epi8(2)));
-
+
shifts = _mm_blendv_epi8(shifts, _mm_srli_si128(shifts, 2),
_mm_srli_si128(_mm_slli_epi16(shifts, 6), 2));
chunkHigh = _mm_srli_epi32(chunkHigh, 2);
-
+
shifts = _mm_blendv_epi8(shifts, _mm_srli_si128(shifts, 4),
_mm_srli_si128(_mm_slli_epi16(shifts, 5), 4));
@@ -166,15 +166,15 @@ static Y_FORCE_INLINE ui32 Unpack16BytesIntoUtf16IfNoSurrogats(const unsigned ch
chunkHigh = _mm_or_si128(chunkHigh,
_mm_and_si128(_mm_and_si128(_mm_slli_epi32(chunk_right, 4), _mm_set1_epi8(0xf0)),
mask3));
-
+
int c = _mm_extract_epi16(counts, 7);
sourceAdvance = !(c & 0x0200) ? 16 : !(c & 0x02) ? 15
: 14;
}
-
+
shifts = _mm_blendv_epi8(shifts, _mm_srli_si128(shifts, 8),
_mm_srli_si128(_mm_slli_epi16(shifts, 4), 8));
-
+
chunkHigh = _mm_slli_si128(chunkHigh, 1);
__m128i shuf = _mm_add_epi8(shifts, _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0));
@@ -206,16 +206,16 @@ namespace NDetail {
_mm_store_si128(reinterpret_cast<__m128i*>(destAligned), utf16Low);
_mm_store_si128(reinterpret_cast<__m128i*>(destAligned) + 1, utf16High);
- memcpy(dest, destAligned, sizeof(__m128i) * 2);
+ memcpy(dest, destAligned, sizeof(__m128i) * 2);
dest += dstAdvance;
}
//The rest will be handled sequencially.
// Possible improvement: go back to the vectorized processing after the error or the 4 byte sequence
}
-
+
void UTF8ToWideImplSSE41(const unsigned char*& cur, const unsigned char* last, wchar32*& dest) noexcept {
alignas(16) wchar32 destAligned[16];
-
+
while (cur + 16 <= last) {
__m128i utf16Low;
__m128i utf16High;
@@ -238,10 +238,10 @@ namespace NDetail {
memcpy(dest, destAligned, sizeof(__m128i) * 4);
dest += dstAdvance;
- }
- //The rest will be handled sequencially.
+ }
+ //The rest will be handled sequencially.
// Possible improvement: go back to the vectorized processing after the error or the 4 byte sequence
- }
-}
+ }
+}
#endif
diff --git a/util/charset/ya.make b/util/charset/ya.make
index 26d38cb10b..e41a9b76e7 100644
--- a/util/charset/ya.make
+++ b/util/charset/ya.make
@@ -21,13 +21,13 @@ JOIN_SRCS(
IF (ARCH_X86_64 AND NOT DISABLE_INSTRUCTION_SETS)
SRC_CPP_SSE41(wide_sse41.cpp)
-ELSE()
+ELSE()
SRC(
wide_sse41.cpp
-DSSE41_STUB
)
-ENDIF()
-
+ENDIF()
+
END()
RECURSE_FOR_TESTS(
diff --git a/util/digest/city.h b/util/digest/city.h
index 675a798074..aca3e1f8cb 100644
--- a/util/digest/city.h
+++ b/util/digest/city.h
@@ -3,13 +3,13 @@
#include <util/generic/utility.h>
#include <util/generic/strbuf.h>
-#include <utility>
+#include <utility>
// NOTE: These functions provide CityHash 1.0 implementation whose results are *different* from
// the mainline version of CityHash.
-using uint128 = std::pair<ui64, ui64>;
-
+using uint128 = std::pair<ui64, ui64>;
+
constexpr ui64 Uint128Low64(const uint128& x) {
return x.first;
}
diff --git a/util/draft/enum.h b/util/draft/enum.h
index 18002b7df2..5c3d202361 100644
--- a/util/draft/enum.h
+++ b/util/draft/enum.h
@@ -6,7 +6,7 @@
#include <util/stream/str.h>
#include <util/string/cast.h>
#include <util/string/split.h>
-#include <utility>
+#include <utility>
class TEnumNotFoundException: public yexception {
};
@@ -20,7 +20,7 @@ class TEnumNotFoundException: public yexception {
#define PrintEnumItems(entries) PrintEnumItemsImpl(entries, Y_ARRAY_SIZE(entries))
template <class K1, class K2, class V>
-const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
+const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
for (size_t i = 0; i < arraySize; i++)
if (entries[i].first == key)
return &entries[i].second;
@@ -29,7 +29,7 @@ const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t
// special version for const char*
template <class V>
-const V* FindEnumFromStringImpl(const char* key, const std::pair<const char*, V>* entries, size_t arraySize) {
+const V* FindEnumFromStringImpl(const char* key, const std::pair<const char*, V>* entries, size_t arraySize) {
for (size_t i = 0; i < arraySize; i++)
if (entries[i].first && key && !strcmp(entries[i].first, key))
return &entries[i].second;
@@ -56,7 +56,7 @@ TString PrintEnumItemsImpl(const std::pair<const char*, V>* entries, size_t arra
}
template <class K1, class K2, class V>
-const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
+const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
const V* res = FindEnumFromStringImpl(key, entries, arraySize);
if (res)
return res;
@@ -65,7 +65,7 @@ const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arra
}
template <class K, class V>
-const K* EnumToStringImpl(V value, const std::pair<K, V>* entries, size_t arraySize) {
+const K* EnumToStringImpl(V value, const std::pair<K, V>* entries, size_t arraySize) {
for (size_t i = 0; i < arraySize; i++)
if (entries[i].second == value)
return &entries[i].first;
@@ -105,7 +105,7 @@ inline void SetEnumFlags(const std::pair<const char*, E> (&str2Enum)[N], TString
}
template <class E, size_t B>
-inline void SetEnumFlags(const std::pair<const char*, E>* str2Enum, TStringBuf optSpec,
+inline void SetEnumFlags(const std::pair<const char*, E>* str2Enum, TStringBuf optSpec,
std::bitset<B>& flags, const size_t size,
bool allIfEmpty = true) {
if (optSpec.empty()) {
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h
index badfb88993..d4c1c4ac6c 100644
--- a/util/generic/algorithm.h
+++ b/util/generic/algorithm.h
@@ -9,7 +9,7 @@
#include <numeric>
#include <algorithm>
#include <iterator>
-#include <utility>
+#include <utility>
namespace NPrivate {
template <class I, class F, class P>
@@ -656,12 +656,12 @@ static inline auto CountIf(const C& c, P pred) {
}
template <class I1, class I2>
-static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2) {
+static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2) {
return std::mismatch(b1, e1, b2);
}
template <class I1, class I2, class P>
-static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2, P p) {
+static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2, P p) {
return std::mismatch(b1, e1, b2, p);
}
@@ -677,21 +677,21 @@ static inline void NthElement(RandomIterator begin, RandomIterator nth, RandomIt
// no standard implementation until C++14
template <class I1, class I2>
-static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2, I2 e2) {
+static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2, I2 e2) {
while (b1 != e1 && b2 != e2 && *b1 == *b2) {
++b1;
++b2;
}
- return std::make_pair(b1, b2);
+ return std::make_pair(b1, b2);
}
template <class I1, class I2, class P>
-static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2, I2 e2, P p) {
+static inline std::pair<I1, I2> Mismatch(I1 b1, I1 e1, I2 b2, I2 e2, P p) {
while (b1 != e1 && b2 != e2 && p(*b1, *b2)) {
++b1;
++b2;
}
- return std::make_pair(b1, b2);
+ return std::make_pair(b1, b2);
}
template <class It, class Val>
@@ -705,12 +705,12 @@ static inline bool BinarySearch(It begin, It end, const Val& val, Comp comp) {
}
template <class It, class Val>
-static inline std::pair<It, It> EqualRange(It begin, It end, const Val& val) {
+static inline std::pair<It, It> EqualRange(It begin, It end, const Val& val) {
return std::equal_range(begin, end, val);
}
template <class It, class Val, class Comp>
-static inline std::pair<It, It> EqualRange(It begin, It end, const Val& val, Comp comp) {
+static inline std::pair<It, It> EqualRange(It begin, It end, const Val& val, Comp comp) {
return std::equal_range(begin, end, val, comp);
}
@@ -745,12 +745,12 @@ TO CopyIf(TI begin, TI end, TO to, P pred) {
}
template <class T>
-std::pair<const T&, const T&> MinMax(const T& first, const T& second) {
+std::pair<const T&, const T&> MinMax(const T& first, const T& second) {
return std::minmax(first, second);
}
template <class It>
-std::pair<It, It> MinMaxElement(It first, It last) {
+std::pair<It, It> MinMaxElement(It first, It last) {
return std::minmax_element(first, last);
}
diff --git a/util/generic/algorithm_ut.cpp b/util/generic/algorithm_ut.cpp
index 8d732fcc0c..d13cd6b0d9 100644
--- a/util/generic/algorithm_ut.cpp
+++ b/util/generic/algorithm_ut.cpp
@@ -391,7 +391,7 @@ Y_UNIT_TEST_SUITE(TAlgorithm) {
{
int data[] = {1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 5};
- using PairOfInt = std::pair<int*, int*>;
+ using PairOfInt = std::pair<int*, int*>;
PairOfInt tmp = EqualRange(data, data + Y_ARRAY_SIZE(data), 3);
UNIT_ASSERT_EQUAL(tmp.second - tmp.first, 4);
@@ -603,7 +603,7 @@ Y_UNIT_TEST_SUITE(TAlgorithm) {
}
Y_UNIT_TEST(MinMaxTest) {
- std::pair<int, int> p1 = MinMax(5, 12);
+ std::pair<int, int> p1 = MinMax(5, 12);
UNIT_ASSERT_EQUAL(p1.first, 5);
UNIT_ASSERT_EQUAL(p1.second, 12);
diff --git a/util/generic/deque.h b/util/generic/deque.h
index 2dabaf3177..4440adb8f2 100644
--- a/util/generic/deque.h
+++ b/util/generic/deque.h
@@ -15,8 +15,8 @@ class TDeque: public std::deque<T, TReboundAllocator<A, T>> {
public:
using TBase::TBase;
- inline yssize_t ysize() const noexcept {
- return (yssize_t)this->size();
+ inline yssize_t ysize() const noexcept {
+ return (yssize_t)this->size();
}
inline explicit operator bool() const noexcept {
diff --git a/util/generic/hash.h b/util/generic/hash.h
index e46db21fa9..fc64dc2c29 100644
--- a/util/generic/hash.h
+++ b/util/generic/hash.h
@@ -15,7 +15,7 @@
#include <initializer_list>
#include <memory>
#include <tuple>
-#include <utility>
+#include <utility>
#include <cstdlib>
@@ -1027,13 +1027,13 @@ std::pair<typename THashTable<V, K, HF, Ex, Eq, A>::iterator, bool> THashTable<V
if (first) /*y*/
for (node* cur = first; !((uintptr_t)cur & 1); cur = cur->next) /*y*/
if (equals(get_key(cur->val), get_key(obj)))
- return std::pair<iterator, bool>(iterator(cur), false); /*y*/
+ return std::pair<iterator, bool>(iterator(cur), false); /*y*/
node* tmp = new_node(obj);
tmp->next = first ? first : (node*)((uintptr_t)&buckets[n + 1] | 1); /*y*/
buckets[n] = tmp;
++num_elements;
- return std::pair<iterator, bool>(iterator(tmp), true); /*y*/
+ return std::pair<iterator, bool>(iterator(tmp), true); /*y*/
}
template <class V, class K, class HF, class Ex, class Eq, class A>
@@ -1099,7 +1099,7 @@ __yhashtable_iterator<V> THashTable<V, K, HF, Ex, Eq, A>::find_i(const OtherKey&
template <class V, class K, class HF, class Ex, class Eq, class A>
template <class OtherKey>
std::pair<__yhashtable_iterator<V>, __yhashtable_iterator<V>> THashTable<V, K, HF, Ex, Eq, A>::equal_range(const OtherKey& key) {
- using pii = std::pair<iterator, iterator>;
+ using pii = std::pair<iterator, iterator>;
const size_type n = bkt_num_key(key);
node* first = buckets[n];
@@ -1122,7 +1122,7 @@ std::pair<__yhashtable_iterator<V>, __yhashtable_iterator<V>> THashTable<V, K, H
template <class V, class K, class HF, class Ex, class Eq, class A>
template <class OtherKey>
std::pair<__yhashtable_const_iterator<V>, __yhashtable_const_iterator<V>> THashTable<V, K, HF, Ex, Eq, A>::equal_range(const OtherKey& key) const {
- using pii = std::pair<const_iterator, const_iterator>;
+ using pii = std::pair<const_iterator, const_iterator>;
const size_type n = bkt_num_key(key);
const node* first = buckets[n];
@@ -1525,7 +1525,7 @@ public:
return rep.size();
}
yssize_t ysize() const noexcept {
- return (yssize_t)rep.size();
+ return (yssize_t)rep.size();
}
size_type max_size() const noexcept {
return rep.max_size();
@@ -1566,7 +1566,7 @@ public:
rep.insert_unique(f, l);
}
- std::pair<iterator, bool> insert(const value_type& obj) {
+ std::pair<iterator, bool> insert(const value_type& obj) {
return rep.insert_unique(obj);
}
@@ -1677,12 +1677,12 @@ public:
}
template <class TKey>
- std::pair<iterator, iterator> equal_range(const TKey& key) {
+ std::pair<iterator, iterator> equal_range(const TKey& key) {
return rep.equal_range(key);
}
template <class TKey>
- std::pair<const_iterator, const_iterator> equal_range(const TKey& key) const {
+ std::pair<const_iterator, const_iterator> equal_range(const TKey& key) const {
return rep.equal_range(key);
}
@@ -1849,8 +1849,8 @@ public:
size_type size() const {
return rep.size();
}
- yssize_t ysize() const {
- return (yssize_t)rep.size();
+ yssize_t ysize() const {
+ return (yssize_t)rep.size();
}
size_type max_size() const {
return rep.max_size();
@@ -1945,12 +1945,12 @@ public:
}
template <class TKey>
- std::pair<iterator, iterator> equal_range(const TKey& key) {
+ std::pair<iterator, iterator> equal_range(const TKey& key) {
return rep.equal_range(key);
}
template <class TKey>
- std::pair<const_iterator, const_iterator> equal_range(const TKey& key) const {
+ std::pair<const_iterator, const_iterator> equal_range(const TKey& key) const {
return rep.equal_range(key);
}
diff --git a/util/generic/hash_set.h b/util/generic/hash_set.h
index e8088cf23b..ea91f3386d 100644
--- a/util/generic/hash_set.h
+++ b/util/generic/hash_set.h
@@ -4,7 +4,7 @@
#include "hash.h"
#include <initializer_list>
-#include <utility>
+#include <utility>
#undef value_type
@@ -156,9 +156,9 @@ public:
rep.insert_unique(f, l);
}
- std::pair<iterator, bool> insert(const value_type& obj) {
- std::pair<mutable_iterator, bool> p = rep.insert_unique(obj);
- return std::pair<iterator, bool>(p.first, p.second);
+ std::pair<iterator, bool> insert(const value_type& obj) {
+ std::pair<mutable_iterator, bool> p = rep.insert_unique(obj);
+ return std::pair<iterator, bool>(p.first, p.second);
}
template <typename... Args>
std::pair<iterator, bool> emplace(Args&&... args) {
@@ -167,13 +167,13 @@ public:
}
iterator insert(const_iterator, const value_type& obj) { // insert_hint
- std::pair<mutable_iterator, bool> p = rep.insert_unique(obj);
+ std::pair<mutable_iterator, bool> p = rep.insert_unique(obj);
return p.first;
}
- std::pair<iterator, bool> insert_noresize(const value_type& obj) {
- std::pair<mutable_iterator, bool> p = rep.insert_unique_noresize(obj);
- return std::pair<iterator, bool>(p.first, p.second);
+ std::pair<iterator, bool> insert_noresize(const value_type& obj) {
+ std::pair<mutable_iterator, bool> p = rep.insert_unique_noresize(obj);
+ return std::pair<iterator, bool>(p.first, p.second);
}
template <typename... Args>
std::pair<iterator, bool> emplace_noresize(Args&&... args) {
@@ -214,7 +214,7 @@ public:
}
template <class TKey>
- std::pair<iterator, iterator> equal_range(const TKey& key) const {
+ std::pair<iterator, iterator> equal_range(const TKey& key) const {
return rep.equal_range(key);
}
@@ -422,7 +422,7 @@ public:
}
template <class TKey>
- std::pair<iterator, iterator> equal_range(const TKey& key) const {
+ std::pair<iterator, iterator> equal_range(const TKey& key) const {
return rep.equal_range(key);
}
diff --git a/util/generic/hash_ut.cpp b/util/generic/hash_ut.cpp
index 0551d58770..2a7eba2f49 100644
--- a/util/generic/hash_ut.cpp
+++ b/util/generic/hash_ut.cpp
@@ -295,13 +295,13 @@ void THashTest::TestHMMap1() {
mmap m;
UNIT_ASSERT(m.count('X') == 0);
- m.insert(std::pair<const char, int>('X', 10)); // Standard way.
+ m.insert(std::pair<const char, int>('X', 10)); // Standard way.
UNIT_ASSERT(m.count('X') == 1);
- m.insert(std::pair<const char, int>('X', 20)); // jbuck: standard way
+ m.insert(std::pair<const char, int>('X', 20)); // jbuck: standard way
UNIT_ASSERT(m.count('X') == 2);
- m.insert(std::pair<const char, int>('Y', 32)); // jbuck: standard way
+ m.insert(std::pair<const char, int>('Y', 32)); // jbuck: standard way
mmap::iterator i = m.find('X'); // Find first match.
UNIT_ASSERT((*i).first == 'X');
@@ -358,9 +358,9 @@ void THashTest::TestHMMap1() {
void THashTest::TestHMMapHas() {
using mmap = THashMultiMap<char, int, THash<char>, TEqualTo<char>>;
mmap m;
- m.insert(std::pair<const char, int>('X', 10));
- m.insert(std::pair<const char, int>('X', 20));
- m.insert(std::pair<const char, int>('Y', 32));
+ m.insert(std::pair<const char, int>('X', 10));
+ m.insert(std::pair<const char, int>('X', 20));
+ m.insert(std::pair<const char, int>('Y', 32));
UNIT_ASSERT(m.contains('X'));
UNIT_ASSERT(m.contains('Y'));
UNIT_ASSERT(!m.contains('Z'));
diff --git a/util/generic/list.h b/util/generic/list.h
index 7b0b8ffc72..8dac504e96 100644
--- a/util/generic/list.h
+++ b/util/generic/list.h
@@ -7,7 +7,7 @@
#include <initializer_list>
#include <list>
#include <memory>
-#include <utility>
+#include <utility>
template <class T, class A>
class TList: public std::list<T, TReboundAllocator<A, T>> {
diff --git a/util/generic/map.h b/util/generic/map.h
index b5001b56c0..39df17b785 100644
--- a/util/generic/map.h
+++ b/util/generic/map.h
@@ -6,7 +6,7 @@
#include <util/str_stl.h>
#include <util/memory/alloc.h>
-#include <utility>
+#include <utility>
#include <initializer_list>
#include <map>
#include <memory>
diff --git a/util/generic/map_ut.cpp b/util/generic/map_ut.cpp
index 79e832b024..14eb085bc3 100644
--- a/util/generic/map_ut.cpp
+++ b/util/generic/map_ut.cpp
@@ -51,14 +51,14 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
UNIT_ASSERT(m.count('z') == 1);
- std::pair<typename maptype::iterator, bool> p = m.insert(std::pair<const char, int>('c', 100));
+ std::pair<typename maptype::iterator, bool> p = m.insert(std::pair<const char, int>('c', 100));
UNIT_ASSERT(p.second);
UNIT_ASSERT(p.first != m.end());
UNIT_ASSERT((*p.first).first == 'c');
UNIT_ASSERT((*p.first).second == 100);
- p = m.insert(std::pair<const char, int>('c', 100));
+ p = m.insert(std::pair<const char, int>('c', 100));
UNIT_ASSERT(!p.second); // already existing pair
UNIT_ASSERT(p.first != m.end());
@@ -72,13 +72,13 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
UNIT_ASSERT(m.count('X') == 0);
- m.insert(std::pair<const char, int>('X', 10)); // Standard way.
+ m.insert(std::pair<const char, int>('X', 10)); // Standard way.
UNIT_ASSERT(m.count('X') == 1);
- m.insert(std::pair<const char, int>('X', 20)); // jbuck: standard way
+ m.insert(std::pair<const char, int>('X', 20)); // jbuck: standard way
UNIT_ASSERT(m.count('X') == 2);
- m.insert(std::pair<const char, int>('Y', 32)); // jbuck: standard way
+ m.insert(std::pair<const char, int>('Y', 32)); // jbuck: standard way
typename mmap::iterator i = m.find('X'); // Find first match.
++i;
UNIT_ASSERT((*i).first == 'X');
@@ -94,7 +94,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestMMap2) {
- using pair_type = std::pair<const int, char>;
+ using pair_type = std::pair<const int, char>;
pair_type p1(3, 'c');
pair_type p2(6, 'f');
@@ -194,7 +194,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
maptype m;
m['x'] = 10;
- std::pair<maptype::iterator, maptype::iterator> ret;
+ std::pair<maptype::iterator, maptype::iterator> ret;
ret = m.equal_range('x');
UNIT_ASSERT(ret.first != ret.second);
UNIT_ASSERT((*(ret.first)).first == 'x');
@@ -212,7 +212,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
i = m.upper_bound('x');
UNIT_ASSERT(i == m.end());
- std::pair<maptype::iterator, maptype::iterator> ret;
+ std::pair<maptype::iterator, maptype::iterator> ret;
ret = m.equal_range('x');
UNIT_ASSERT(ret.first == ret.second);
UNIT_ASSERT(ret.first == m.end());
@@ -220,7 +220,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
{
const maptype m;
- std::pair<maptype::const_iterator, maptype::const_iterator> ret;
+ std::pair<maptype::const_iterator, maptype::const_iterator> ret;
ret = m.equal_range('x');
UNIT_ASSERT(ret.first == ret.second);
UNIT_ASSERT(ret.first == m.end());
@@ -357,7 +357,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
UNIT_ASSERT(ccont.find(2) != ccont.end());
UNIT_ASSERT(ccont.lower_bound(2) != ccont.end());
UNIT_ASSERT(ccont.upper_bound(2) != ccont.end());
- UNIT_ASSERT(ccont.equal_range(2) != std::make_pair(ccont.end(), ccont.end()));
+ UNIT_ASSERT(ccont.equal_range(2) != std::make_pair(ccont.end(), ccont.end()));
}
{
@@ -430,9 +430,9 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
Container c(direct);
c = Container(inverse);
- c.insert(std::make_pair(TKey(1), 101));
- c.insert(std::make_pair(TKey(2), 102));
- c.insert(std::make_pair(TKey(3), 103));
+ c.insert(std::make_pair(TKey(1), 101));
+ c.insert(std::make_pair(TKey(2), 102));
+ c.insert(std::make_pair(TKey(3), 103));
TVector<int> values;
for (auto& i : c) {
diff --git a/util/generic/set_ut.cpp b/util/generic/set_ut.cpp
index d2769d327f..fe51cc44c0 100644
--- a/util/generic/set_ut.cpp
+++ b/util/generic/set_ut.cpp
@@ -23,7 +23,7 @@ Y_UNIT_TEST_SUITE(YSetTest) {
Y_UNIT_TEST(TestSet2) {
using int_set = TSet<int, TLess<int>>;
int_set s;
- std::pair<int_set::iterator, bool> p = s.insert(42);
+ std::pair<int_set::iterator, bool> p = s.insert(42);
UNIT_ASSERT(p.second == true);
p = s.insert(42);
UNIT_ASSERT(p.second == false);
diff --git a/util/generic/typetraits.h b/util/generic/typetraits.h
index d165bd1a06..604d2591a4 100644
--- a/util/generic/typetraits.h
+++ b/util/generic/typetraits.h
@@ -6,7 +6,7 @@
#include <iterator>
#include <type_traits>
-#include <stlfwd>
+#include <stlfwd>
#if _LIBCPP_STD_VER >= 17
template <bool B>
@@ -228,12 +228,12 @@ class TTypeTraits<void>: public TTypeTraitsBase<void> {};
*/
#define Y_HAS_SUBTYPE(...) Y_PASS_VA_ARGS(Y_MACRO_IMPL_DISPATCHER_2(__VA_ARGS__, Y_HAS_SUBTYPE_IMPL_2, Y_HAS_SUBTYPE_IMPL_1)(__VA_ARGS__))
-template <class T1, class T2>
-struct TPodTraits<std::pair<T1, T2>> {
- enum {
- IsPod = TTypeTraits<T1>::IsPod && TTypeTraits<T2>::IsPod
- };
-};
+template <class T1, class T2>
+struct TPodTraits<std::pair<T1, T2>> {
+ enum {
+ IsPod = TTypeTraits<T1>::IsPod && TTypeTraits<T2>::IsPod
+ };
+};
template <class T>
struct TIsPointerToConstMemberFunction: std::false_type {
diff --git a/util/generic/vector.h b/util/generic/vector.h
index a5b258955a..4f9e7f715e 100644
--- a/util/generic/vector.h
+++ b/util/generic/vector.h
@@ -106,8 +106,8 @@ public:
return TBase::empty();
}
- inline yssize_t ysize() const noexcept {
- return (yssize_t)TBase::size();
+ inline yssize_t ysize() const noexcept {
+ return (yssize_t)TBase::size();
}
#ifdef _YNDX_LIBCXX_ENABLE_VECTOR_POD_RESIZE_UNINITIALIZED
diff --git a/util/str_stl.h b/util/str_stl.h
index f1e137181d..a91846292e 100644
--- a/util/str_stl.h
+++ b/util/str_stl.h
@@ -9,7 +9,7 @@
#include <functional>
#include <typeindex>
-#include <utility>
+#include <utility>
namespace std {
template <>
diff --git a/util/system/fasttime.cpp b/util/system/fasttime.cpp
index 057a814f0a..4d40a42d63 100644
--- a/util/system/fasttime.cpp
+++ b/util/system/fasttime.cpp
@@ -3,7 +3,7 @@
#include <util/generic/singleton.h>
#include <util/generic/yexception.h>
-#include <utility>
+#include <utility>
#include <util/thread/singleton.h>
@@ -121,7 +121,7 @@ namespace {
template <size_t N, class A, class B>
class TLinePredictor {
public:
- using TSample = std::pair<A, B>;
+ using TSample = std::pair<A, B>;
inline TLinePredictor()
: C_(0)
diff --git a/util/system/thread.cpp b/util/system/thread.cpp
index 6236746c2d..86762e3286 100644
--- a/util/system/thread.cpp
+++ b/util/system/thread.cpp
@@ -7,7 +7,7 @@
#include <util/generic/ylimits.h>
#include <util/generic/yexception.h>
#include "yassert.h"
-#include <utility>
+#include <utility>
#if defined(_glibc_)
#if !__GLIBC_PREREQ(2, 30)
diff --git a/util/system/tls.cpp b/util/system/tls.cpp
index c2f1a04a14..9de07d366d 100644
--- a/util/system/tls.cpp
+++ b/util/system/tls.cpp
@@ -243,8 +243,8 @@ TKey::TKey(TDtor dtor)
{
}
-TKey::TKey(TKey&&) noexcept = default;
-
+TKey::TKey(TKey&&) noexcept = default;
+
TKey::~TKey() = default;
void* TKey::Get() const {
diff --git a/util/system/tls.h b/util/system/tls.h
index 3c4f56dbeb..7539dcb35e 100644
--- a/util/system/tls.h
+++ b/util/system/tls.h
@@ -157,7 +157,7 @@ namespace NTls {
class TKey {
public:
TKey(TDtor dtor);
- TKey(TKey&&) noexcept;
+ TKey(TKey&&) noexcept;
~TKey();
void* Get() const;
@@ -177,7 +177,7 @@ namespace NTls {
};
template <class T>
- class TValue: public TMoveOnly {
+ class TValue: public TMoveOnly {
class TConstructor {
public:
TConstructor() noexcept = default;
diff --git a/util/system/types.h b/util/system/types.h
index 12e68a6060..4955fbb3bb 100644
--- a/util/system/types.h
+++ b/util/system/types.h
@@ -11,9 +11,9 @@ typedef int16_t i16;
typedef uint8_t ui8;
typedef uint16_t ui16;
-typedef int yssize_t;
-#define PRIYSZT "d"
-
+typedef int yssize_t;
+#define PRIYSZT "d"
+
#if defined(_darwin_) && defined(_32_)
typedef unsigned long ui32;
typedef long i32;
diff --git a/ydb/core/base/tablet.h b/ydb/core/base/tablet.h
index 602e39c600..34dd878a8a 100644
--- a/ydb/core/base/tablet.h
+++ b/ydb/core/base/tablet.h
@@ -29,10 +29,10 @@ inline ui64 MakeGenStepPair(ui32 gen, ui32 step) {
return (g << 32ull) | s;
}
-inline std::pair<ui32, ui32> ExpandGenStepPair(ui64 x) {
+inline std::pair<ui32, ui32> ExpandGenStepPair(ui64 x) {
ui32 g = (ui32)(x >> 32ull);
ui32 s = (ui32)(x);
- return std::pair<ui32, ui32>(g, s);
+ return std::pair<ui32, ui32>(g, s);
}
struct TEvTablet {
@@ -103,7 +103,7 @@ struct TEvTablet {
struct TDependencyGraph : public TThrRefBase {
struct TEntry {
- std::pair<ui32, ui32> Id;
+ std::pair<ui32, ui32> Id;
bool IsSnapshot;
TVector<TLogoBlobID> References;
@@ -135,10 +135,10 @@ struct TEvTablet {
}
};
- std::pair<ui32, ui32> Snapshot;
+ std::pair<ui32, ui32> Snapshot;
TDeque<TEntry> Entries;
- TDependencyGraph(const std::pair<ui32, ui32> &snap)
+ TDependencyGraph(const std::pair<ui32, ui32> &snap)
: Snapshot(snap)
{}
@@ -164,12 +164,12 @@ struct TEvTablet {
}
void Invalidate() {
- Snapshot = std::make_pair(Max<ui32>(), Max<ui32>());
+ Snapshot = std::make_pair(Max<ui32>(), Max<ui32>());
Entries.clear();
}
bool IsValid() const {
- return (Snapshot.first != Max<ui32>());
+ return (Snapshot.first != Max<ui32>());
}
};
diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_requestimpl.h b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_requestimpl.h
index 61c0996e08..b85ff15229 100644
--- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_requestimpl.h
+++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_requestimpl.h
@@ -469,7 +469,7 @@ public:
Index = AtomicIncrement(LastIndex);
if (PartsPtr) {
for (size_t i = 0; i < PartsPtr->Size(); ++i) {
- RemainingSize += (*PartsPtr)[i].second;
+ RemainingSize += (*PartsPtr)[i].second;
}
}
TotalSize = RemainingSize;
diff --git a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap.h b/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap.h
index 651117f2b9..5c6714f33a 100644
--- a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap.h
+++ b/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap.h
@@ -199,8 +199,8 @@ namespace NKikimr {
// for testing purposes
TVector<NPrivate::TChainLayoutBuilder::TSeg> GetLayout() const;
// returns (ChainsSize, SearchTableSize)
- std::pair<ui32, ui32> GetTablesSize() const {
- return std::pair<ui32, ui32>(ChainDelegators.size(), SearchTable.size());
+ std::pair<ui32, ui32> GetTablesSize() const {
+ return std::pair<ui32, ui32>(ChainDelegators.size(), SearchTable.size());
}
// Builds a map of BlobSize -> THugeSlotsMap::TSlotInfo for THugeBlobCtx
std::shared_ptr<THugeSlotsMap> BuildHugeSlotsMap() const;
diff --git a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap_ut.cpp b/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap_ut.cpp
index 638269fdfd..418097144b 100644
--- a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap_ut.cpp
+++ b/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap_ut.cpp
@@ -253,7 +253,7 @@ namespace NKikimr {
TAllChains all("vdisk", 134274560, 56896, 512 << 10, 512 << 10, 10 << 20, 8, false);
all.PrintOutChains(STR);
all.PrintOutSearchTable(STR);
- std::pair<ui32, ui32> p = all.GetTablesSize();
+ std::pair<ui32, ui32> p = all.GetTablesSize();
TVector<NPrivate::TChainLayoutBuilder::TSeg> canonical = {
{9, 10}, {10, 11}, {11, 12}, {12, 13}, {13, 14}, {14, 15}, {15, 16}, {16, 18}, {18, 20},
{20, 22}, {22, 24}, {24, 27}, {27, 30}, {30, 33}, {33, 37}, {37, 41}, {41, 46}, {46, 51},
diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
index 96b813d317..66e70e4a0f 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
@@ -1919,7 +1919,7 @@ namespace NKikimr {
void RenderState(IOutputStream &str, const TActorContext &ctx) {
constexpr ui32 threshold = 10000u;
- std::pair<ui32, ui32> actorQueues = ctx.CountMailboxEvents(threshold);
+ std::pair<ui32, ui32> actorQueues = ctx.CountMailboxEvents(threshold);
HTML(str) {
DIV_CLASS("panel panel-info") {
diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeletonfront.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeletonfront.cpp
index 08c32a8921..23baba1b2d 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeletonfront.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeletonfront.cpp
@@ -801,7 +801,7 @@ namespace NKikimr {
TString GenerateHtmlStateForSkeletonFrontActor(const TActorContext &ctx) const {
constexpr ui32 threshold = 10000u;
- std::pair<ui32, ui32> actorQueues = ctx.CountMailboxEvents(threshold);
+ std::pair<ui32, ui32> actorQueues = ctx.CountMailboxEvents(threshold);
TStringStream str;
HTML(str) {
diff --git a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp
index 1a2fb95e1c..9e5fa2cc5b 100644
--- a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp
+++ b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.cpp
@@ -52,10 +52,10 @@ namespace NKikimr {
}
}
- std::pair<TOneChunkPtr, const char *> TOneChunk::Construct(const char *serialized) {
+ std::pair<TOneChunkPtr, const char *> TOneChunk::Construct(const char *serialized) {
ui32 chunkIdx = *(const ui32 *)serialized;
serialized += 4;
- return std::pair<TOneChunkPtr, const char *>(new TOneChunk(chunkIdx), serialized);
+ return std::pair<TOneChunkPtr, const char *>(new TOneChunk(chunkIdx), serialized);
}
////////////////////////////////////////////////////////////////////////////
@@ -136,7 +136,7 @@ namespace NKikimr {
return idx.Serialize(s);
}
- std::pair<TOneChunkIndexPtr, const char *> TOneChunkIndex::Construct(const char *serialized) {
+ std::pair<TOneChunkIndexPtr, const char *> TOneChunkIndex::Construct(const char *serialized) {
ui64 lastRealLsn;
memcpy(&lastRealLsn, serialized, sizeof(ui64));
serialized += sizeof(ui64);
@@ -157,7 +157,7 @@ namespace NKikimr {
}
TOneChunkIndexPtr ptr(new TOneChunkIndex(lastRealLsn, index));
- return std::pair<TOneChunkIndexPtr, const char *>(ptr, serialized);
+ return std::pair<TOneChunkIndexPtr, const char *>(ptr, serialized);
}
TOneChunkIndex::TOneChunkIndex(ui64 lastRealLsn, TDiskIndexRecs &index)
@@ -177,11 +177,11 @@ namespace NKikimr {
str << "}";
}
- std::pair<TIndexedChunkPtr, const char *> TIndexedChunk::Construct(const char *serialized) {
+ std::pair<TIndexedChunkPtr, const char *> TIndexedChunk::Construct(const char *serialized) {
auto chunkRes = TOneChunk::Construct(serialized);
auto indexRes = TOneChunkIndex::Construct(chunkRes.second);
TIndexedChunkPtr ptr(new TIndexedChunk(chunkRes.first, indexRes.first));
- return std::pair<TIndexedChunkPtr, const char *>(ptr, indexRes.second);
+ return std::pair<TIndexedChunkPtr, const char *>(ptr, indexRes.second);
}
ui32 TIndexedChunk::Serialize(IOutputStream &s) const {
@@ -490,7 +490,7 @@ namespace NKikimr {
ui32 chunksNum = *(const ui32 *)pos;
pos += 4;
while (pos != end) {
- std::pair<TIndexedChunkPtr, const char *> c = TIndexedChunk::Construct(pos);
+ std::pair<TIndexedChunkPtr, const char *> c = TIndexedChunk::Construct(pos);
ManyIdxChunks.push_back(c.first);
pos = c.second;
}
diff --git a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.h b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.h
index f6b8a3abaa..dfce02b60b 100644
--- a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.h
+++ b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdsk.h
@@ -137,7 +137,7 @@ namespace NKikimr {
Y_VERIFY(inserted);
}
- static std::pair<TOneChunkPtr, const char *> Construct(const char *serialized);
+ static std::pair<TOneChunkPtr, const char *> Construct(const char *serialized);
private:
ui32 ChunkIdx = 0;
@@ -198,7 +198,7 @@ namespace NKikimr {
ui32 Serialize(IOutputStream &s,
const TDeltaToDiskRecLog::TOneAppend &append,
ui32 indexBulk) const;
- static std::pair<TOneChunkIndexPtr, const char *> Construct(const char *serialized);
+ static std::pair<TOneChunkIndexPtr, const char *> Construct(const char *serialized);
class TIterator;
@@ -345,7 +345,7 @@ namespace NKikimr {
}
void OutputHtml(IOutputStream &str) const;
- static std::pair<TIndexedChunkPtr, const char *> Construct(const char *serialized);
+ static std::pair<TIndexedChunkPtr, const char *> Construct(const char *serialized);
TString ToString() const {
TStringStream s;
s << "{" << ChunkPtr->ToString() << " " << IndexPtr->ToString() << "}";
@@ -496,9 +496,9 @@ namespace NKikimr {
}
}
- std::pair<ui32, const TDiskIndexRecord *> Get() const {
+ std::pair<ui32, const TDiskIndexRecord *> Get() const {
Y_VERIFY_DEBUG(Valid());
- return std::pair<ui32, const TDiskIndexRecord *>((*ChunkIt)->GetChunkIdx(), IdxBulkIt.Get());
+ return std::pair<ui32, const TDiskIndexRecord *>((*ChunkIt)->GetChunkIdx(), IdxBulkIt.Get());
}
bool Valid() const {
diff --git a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogmem.h b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogmem.h
index 4186dea1c6..8ea8060b11 100644
--- a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogmem.h
+++ b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogmem.h
@@ -231,17 +231,17 @@ namespace NKikimr {
return Header.LastLsn;
}
- std::pair<const void *, size_t> GetFirstRaw() const {
- return std::pair<const void *, size_t>(&Header, sizeof(Header));
+ std::pair<const void *, size_t> GetFirstRaw() const {
+ return std::pair<const void *, size_t>(&Header, sizeof(Header));
}
- std::pair<const void *, size_t> GetSecondRaw() const {
- return std::pair<const void *, size_t>(Ptr->Data(), Header.FreePos);
+ std::pair<const void *, size_t> GetSecondRaw() const {
+ return std::pair<const void *, size_t>(Ptr->Data(), Header.FreePos);
}
- std::pair<const void *, size_t> GetThirdRaw(ui32 pageSize) const {
+ std::pair<const void *, size_t> GetThirdRaw(ui32 pageSize) const {
size_t s = pageSize - Header.FreePos - sizeof(Header);
- return std::pair<const void *, size_t>(nullptr, s);
+ return std::pair<const void *, size_t>(nullptr, s);
}
TString ToVerboseString() const;
diff --git a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogreader.cpp b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogreader.cpp
index 2873bcb56c..3c54ffb15f 100644
--- a/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogreader.cpp
+++ b/ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogreader.cpp
@@ -317,7 +317,7 @@ namespace NKikimr {
if (!DiskIt.Valid()) {
ReadFromMemory(ctx);
} else {
- std::pair<ui32, const TDiskIndexRecord *> p = DiskIt.Get();
+ std::pair<ui32, const TDiskIndexRecord *> p = DiskIt.Get();
ui32 chunkIdx = p.first;
const TDiskIndexRecord *idxRec = p.second;
@@ -340,7 +340,7 @@ namespace NKikimr {
CHECK_PDISK_RESPONSE(SlCtx->VCtx, ev, ctx);
Y_VERIFY(DiskIt.Valid());
- std::pair<ui32, const TDiskIndexRecord *> p = DiskIt.Get();
+ std::pair<ui32, const TDiskIndexRecord *> p = DiskIt.Get();
ui32 chunkIdx = p.first;
const TDiskIndexRecord *idxRec = p.second;
auto msg = ev->Get();
diff --git a/ydb/core/client/minikql_compile/yql_expr_minikql.cpp b/ydb/core/client/minikql_compile/yql_expr_minikql.cpp
index 76f38bf35c..5ac67b6b19 100644
--- a/ydb/core/client/minikql_compile/yql_expr_minikql.cpp
+++ b/ydb/core/client/minikql_compile/yql_expr_minikql.cpp
@@ -43,7 +43,7 @@
#include <util/string/cast.h>
#include <util/string/hex.h>
#include <util/string/builder.h>
-#include <utility>
+#include <utility>
namespace NYql {
diff --git a/ydb/core/client/server/msgbus_tabletreq.h b/ydb/core/client/server/msgbus_tabletreq.h
index f173ae9097..d52f861c08 100644
--- a/ydb/core/client/server/msgbus_tabletreq.h
+++ b/ydb/core/client/server/msgbus_tabletreq.h
@@ -95,7 +95,7 @@ public:
clientConfig.ForceFollower = true;
}
- std::pair<ui64, TAutoPtr<IEventBase>> reqPair = static_cast<TDerived *>(this)->MakeReqPair(ctx);
+ std::pair<ui64, TAutoPtr<IEventBase>> reqPair = static_cast<TDerived *>(this)->MakeReqPair(ctx);
TabletId = reqPair.first;
if (reqPair.first) {
@@ -130,8 +130,8 @@ protected:
{}
public:
- std::pair<ui64, TAutoPtr<IEventBase>> MakeReqPair(const TActorContext &ctx) {
- return std::pair<ui64, TAutoPtr<IEventBase>>(TabletID, static_cast<TDerived *>(this)->MakeReq(ctx));
+ std::pair<ui64, TAutoPtr<IEventBase>> MakeReqPair(const TActorContext &ctx) {
+ return std::pair<ui64, TAutoPtr<IEventBase>>(TabletID, static_cast<TDerived *>(this)->MakeReq(ctx));
}
static constexpr auto ActorActivityType() {
diff --git a/ydb/core/persqueue/type_codecs_defs.h b/ydb/core/persqueue/type_codecs_defs.h
index 90c55d4b89..71b97731d8 100644
--- a/ydb/core/persqueue/type_codecs_defs.h
+++ b/ydb/core/persqueue/type_codecs_defs.h
@@ -342,7 +342,7 @@ public:
template <typename TCodec>
const ICodec* AddCodec() {
auto codec = Singleton<TCodec>();
- auto inserted = Codecs.insert(std::make_pair(TCodec::Sig(), codec));
+ auto inserted = Codecs.insert(std::make_pair(TCodec::Sig(), codec));
Y_VERIFY(inserted.second, "Codec signature collision (%u).", ui16(TCodec::Sig()));
return codec;
}
diff --git a/ydb/core/scheme/scheme_types_auto.h b/ydb/core/scheme/scheme_types_auto.h
index 06264b4c73..3ab37ef0a0 100644
--- a/ydb/core/scheme/scheme_types_auto.h
+++ b/ydb/core/scheme/scheme_types_auto.h
@@ -43,7 +43,7 @@ DEFINE_TYPE_AUTO(double, TDouble);
DEFINE_TYPE_AUTO(TString, TString);
DEFINE_TYPE_AUTO(const char*, TString);
-using TPairUi64Ui64Type = std::pair<ui64, ui64>;
+using TPairUi64Ui64Type = std::pair<ui64, ui64>;
DEFINE_TYPE_AUTO(TPairUi64Ui64Type, TPairUi64Ui64);
#undef DEFINE_TYPE_AUTO
diff --git a/ydb/core/scheme_types/scheme_type_metadata.h b/ydb/core/scheme_types/scheme_type_metadata.h
index 9c55fcc0a2..5f333b3044 100644
--- a/ydb/core/scheme_types/scheme_type_metadata.h
+++ b/ydb/core/scheme_types/scheme_type_metadata.h
@@ -47,7 +47,7 @@ public:
auto it = MapById.find(typeId);
if (it == MapById.end())
return nullptr;
- return it->second;
+ return it->second;
}
const ITypeMetadata* GetKnownType(TTypeId typeId) const {
@@ -64,7 +64,7 @@ public:
auto it = MapByName.find(name);
if (it == MapByName.end())
return nullptr;
- return it->second;
+ return it->second;
}
TMapById::const_iterator begin() const {
diff --git a/ydb/core/scheme_types/scheme_types_defs.h b/ydb/core/scheme_types/scheme_types_defs.h
index bb06b09702..77115e38d3 100644
--- a/ydb/core/scheme_types/scheme_types_defs.h
+++ b/ydb/core/scheme_types/scheme_types_defs.h
@@ -115,7 +115,7 @@ class TFloat : public TRealBase<float, TFloat, NTypeIds::Float, NNames::Float> {
////////////////////////////////////////////////////////
template<typename TFirst, typename TSecond, ui32 TypeId, const char* Name>
class IIntegerPair : public TTypedType<
- std::pair<TFirst, TSecond>,
+ std::pair<TFirst, TSecond>,
IIntegerPair<TFirst, TSecond, TypeId, Name>,
TypeId, Name
>
diff --git a/ydb/core/tablet/pipe_tracker.cpp b/ydb/core/tablet/pipe_tracker.cpp
index cf6e41a97f..94469c846e 100644
--- a/ydb/core/tablet/pipe_tracker.cpp
+++ b/ydb/core/tablet/pipe_tracker.cpp
@@ -12,11 +12,11 @@ void TPipeTrackerBase::AttachTablet(ui64 txid, ui64 tabletid, ui64 cookie) {
}
auto& tabletSet = txIt->second;
- auto tabIt = tabletSet.find(std::make_pair(cookie, tabletid));
+ auto tabIt = tabletSet.find(std::make_pair(cookie, tabletid));
if (tabIt != tabletSet.end())
return;
- tabletSet.insert(std::make_pair(cookie, tabletid));
+ tabletSet.insert(std::make_pair(cookie, tabletid));
TabletToTx[tabletid].insert(txid);
TxTablets[txid].insert(tabletid);
}
@@ -27,7 +27,7 @@ bool TPipeTrackerBase::DetachTablet(ui64 txid, ui64 tabletid, ui64 cookie) {
return false;
auto& tabletSet = txIt->second;
- auto tabIt = tabletSet.find(std::make_pair(cookie, tabletid));
+ auto tabIt = tabletSet.find(std::make_pair(cookie, tabletid));
if (tabIt == tabletSet.end())
return false;
diff --git a/ydb/core/tablet/pipe_tracker_ut.cpp b/ydb/core/tablet/pipe_tracker_ut.cpp
index 2a67c756d5..c3cc632bd4 100644
--- a/ydb/core/tablet/pipe_tracker_ut.cpp
+++ b/ydb/core/tablet/pipe_tracker_ut.cpp
@@ -19,7 +19,7 @@ Y_UNIT_TEST_SUITE(TPipeTrackerTest) {
UNIT_ASSERT(tracker.FindTx(tablet1).size() == 1);
UNIT_ASSERT(tracker.FindTablets(txid1).size() == 1);
UNIT_ASSERT_EQUAL(*tracker.FindTx(tablet1).begin(), txid1);
- UNIT_ASSERT_EQUAL(tracker.FindTablets(txid1).begin()->second, tablet1);
+ UNIT_ASSERT_EQUAL(tracker.FindTablets(txid1).begin()->second, tablet1);
UNIT_ASSERT(tracker.IsTxAlive(txid1));
UNIT_ASSERT(tracker.DetachTablet(txid1, tablet1));
UNIT_ASSERT(!tracker.IsTxAlive(txid1));
diff --git a/ydb/core/tablet/tablet_req_rebuildhistory.cpp b/ydb/core/tablet/tablet_req_rebuildhistory.cpp
index c0b4c0c2bc..2e9561cbbe 100644
--- a/ydb/core/tablet/tablet_req_rebuildhistory.cpp
+++ b/ydb/core/tablet/tablet_req_rebuildhistory.cpp
@@ -156,7 +156,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
struct TGenerationEntry {
TVector<TLogEntry> Body;
- std::pair<ui32, ui32> PrevGeneration; // gen : confirmed-state
+ std::pair<ui32, ui32> PrevGeneration; // gen : confirmed-state
ui32 NextGeneration;
ui32 Base;
ui32 Cutoff;
@@ -189,9 +189,9 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
TIntrusivePtr<TTabletStorageInfo> Info;
const ui32 BlockedGen;
- std::pair<ui32, ui32> LatestKnownStep;
- std::pair<ui32, ui32> Snapshot;
- std::pair<ui32, ui32> Confirmed;
+ std::pair<ui32, ui32> LatestKnownStep;
+ std::pair<ui32, ui32> Snapshot;
+ std::pair<ui32, ui32> Confirmed;
TMap<ui32, TGenerationEntry> LogInfo;
TSet<TLogoBlobID> RefsToCheck;
@@ -207,8 +207,8 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
TGenerationEntry& GenerationInfo(ui32 gen) {
TGenerationEntry& x = LogInfo[gen];
- if (gen == Snapshot.first)
- x.Base = Snapshot.second;
+ if (gen == Snapshot.first)
+ x.Base = Snapshot.second;
return x;
}
@@ -266,7 +266,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
TGenerationEntry &prev = GenerationInfo(prevGeneration);
prev.NextGeneration = gen;
- if (confirmed.first > 0)
+ if (confirmed.first > 0)
FillGenerationEntries(confirmed, prev, zeroLogEntry);
// here we could erase intermediate entries but who cares as they would be skipped?
@@ -279,20 +279,20 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
return true;
}
- void FillGenerationEntries(std::pair<ui32, ui32> &confirmed, TGenerationEntry &prev, NKikimrTabletBase::TTabletLogEntry &logEntry) {
- if (confirmed.first == Snapshot.first)
- prev.Base = Snapshot.second;
+ void FillGenerationEntries(std::pair<ui32, ui32> &confirmed, TGenerationEntry &prev, NKikimrTabletBase::TTabletLogEntry &logEntry) {
+ if (confirmed.first == Snapshot.first)
+ prev.Base = Snapshot.second;
const ui32 tailsz = logEntry.GetZeroTailSz();
Y_VERIFY(logEntry.ZeroTailBitmaskSize() == ((tailsz + 63) / 64));
- const ui32 gensz = confirmed.second + tailsz;
+ const ui32 gensz = confirmed.second + tailsz;
prev.Ensure(gensz);
prev.Cutoff = gensz; // last entry we interested in, later entries has no interest for us
{ // static part, mark as confirmed
ui32 step = prev.Base;
- for (ui32 end = confirmed.second; step <= end; ++step) {
+ for (ui32 end = confirmed.second; step <= end; ++step) {
TLogEntry &x = prev.Entry(step);
x.BecomeConfirmed();
}
@@ -301,7 +301,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
{ // tail part, mark accordingly to flags
ui64 mask = 0;
ui64 val = 0;
- ui32 step = confirmed.second + 1;
+ ui32 step = confirmed.second + 1;
for (ui32 i = 0; i < tailsz; ++i, mask <<= 1, ++step) {
if (mask == 0) {
mask = 1;
@@ -401,7 +401,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
return ReplyAndDie(NKikimrProto::ERROR, "Log entry parse failed");
}
- LatestKnownStep = std::pair<ui32, ui32>(id.Generation(), id.Step());
+ LatestKnownStep = std::pair<ui32, ui32>(id.Generation(), id.Step());
Snapshot = ExpandGenStepPair(logEntry.GetSnapshot());
BLOG_D("TTabletReqRebuildHistoryGraph::ProcessKeyEntry, LastBlobID: " << id.ToString()
@@ -415,13 +415,13 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
ui32 lastStep = 0;
if (isZeroStep) {
- Confirmed = std::pair<ui32, ui32>(LatestKnownStep.first, 0);
+ Confirmed = std::pair<ui32, ui32>(LatestKnownStep.first, 0);
ProcessZeroEntry(id.Generation(), logEntry);
lastGen = LatestKnownStep.first;
lastStep = 0;
} else {
- Confirmed = std::pair<ui32, ui32>(LatestKnownStep.first, logEntry.GetConfirmed());
+ Confirmed = std::pair<ui32, ui32>(LatestKnownStep.first, logEntry.GetConfirmed());
ProcessLogEntry(id, logEntry);
lastGen = LatestKnownStep.first;
@@ -429,7 +429,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
TGenerationEntry &gx = GenerationInfo(lastGen);
- for (ui32 i = gx.Base, e = Confirmed.second; i <= e; ++i)
+ for (ui32 i = gx.Base, e = Confirmed.second; i <= e; ++i)
gx.Entry(i).BecomeConfirmed();
}
@@ -537,10 +537,10 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
}
void ScanRefsToCheck() {
- if (LatestKnownStep.first != Confirmed.first)
+ if (LatestKnownStep.first != Confirmed.first)
return;
- const ui32 tailGeneration = LatestKnownStep.first;
+ const ui32 tailGeneration = LatestKnownStep.first;
TGenerationEntry *gx = LogInfo.FindPtr(tailGeneration);
if (!gx)
return;
@@ -549,7 +549,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
for (i64 pi = gx->Body.size() - 1; pi >= 0; --pi) {
const ui32 step = gx->Base + (ui32)pi;
- if (step <= Confirmed.second)
+ if (step <= Confirmed.second)
break;
TLogEntry &entry = gx->Entry(step);
@@ -601,12 +601,12 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
void BuildHistory() {
TAutoPtr<TEvTablet::TDependencyGraph> graph(new TEvTablet::TDependencyGraph(Snapshot));
- std::pair<ui32, ui32> invalidLogEntry = std::make_pair(Max<ui32>(), Max<ui32>());
- ui32 lastUnbrokenTailEntry = Confirmed.second;
+ std::pair<ui32, ui32> invalidLogEntry = std::make_pair(Max<ui32>(), Max<ui32>());
+ ui32 lastUnbrokenTailEntry = Confirmed.second;
for (TMap<ui32, TGenerationEntry>::iterator gen = LogInfo.begin(), egen = LogInfo.end();;) {
const ui32 generation = gen->first;
TGenerationEntry &gx = gen->second;
- const bool isTailGeneration = LatestKnownStep.first == generation && Confirmed.first == generation;
+ const bool isTailGeneration = LatestKnownStep.first == generation && Confirmed.first == generation;
bool hasSnapshotInGeneration = (generation == 0);
BLOG_D("TTabletReqRebuildHistoryGraph::BuildHistory - Process generation " << generation
@@ -614,11 +614,11 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
for (ui32 i = 0, e = (ui32)gx.Body.size(); i != e; ++i) {
const ui32 step = gx.Base + i;
- const bool isTail = isTailGeneration && step > Confirmed.second;
+ const bool isTail = isTailGeneration && step > Confirmed.second;
ui32 generationSnapshotStep = 0;
TLogEntry &entry = gx.Entry(step);
- std::pair<ui32, ui32> id(generation, step);
+ std::pair<ui32, ui32> id(generation, step);
if (isTail) {
// Ignore unconfirmed commits on followers
@@ -683,8 +683,8 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
else
graph->AddEntry(id, entry.References, entry.IsSnapshot, entry.GcDiscovered, entry.GcLeft);
- if (lastUnbrokenTailEntry + 1 == id.second)
- lastUnbrokenTailEntry = id.second;
+ if (lastUnbrokenTailEntry + 1 == id.second)
+ lastUnbrokenTailEntry = id.second;
if (entry.IsSnapshot) {
generationSnapshotStep = step;
@@ -738,7 +738,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
if (!hasSnapshotInGeneration && !gx.HasZeroEntry) {
graph->Invalidate();
if (invalidLogEntry.first < generation)
- invalidLogEntry = std::make_pair(generation, 0);
+ invalidLogEntry = std::make_pair(generation, 0);
}
if (gx.NextGeneration == 0) {
@@ -747,7 +747,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
break;
graph->Invalidate();
- invalidLogEntry = std::make_pair(generation, Max<ui32>());
+ invalidLogEntry = std::make_pair(generation, Max<ui32>());
} else {
gen = LogInfo.find(gx.NextGeneration);
Y_VERIFY(gen != egen);
@@ -758,7 +758,7 @@ class TTabletReqRebuildHistoryGraph : public TActorBootstrapped<TTabletReqRebuil
LOG_ALERT(*TlsActivationContext, NKikimrServices::TABLET_MAIN, [&]() {
TStringBuilder sb;
sb << "TTabletReqRebuildHistoryGraph::BuildHistory - Graph rebuild error - no Log entry for ";
- sb << Info->TabletID << ":" << invalidLogEntry.first << ":" << invalidLogEntry.second;
+ sb << Info->TabletID << ":" << invalidLogEntry.first << ":" << invalidLogEntry.second;
return (TString)sb;
}());
if (IntrospectionTrace) {
diff --git a/ydb/core/testlib/tablet_helpers.cpp b/ydb/core/testlib/tablet_helpers.cpp
index a853040b93..09a8fdab43 100644
--- a/ydb/core/testlib/tablet_helpers.cpp
+++ b/ydb/core/testlib/tablet_helpers.cpp
@@ -195,7 +195,7 @@ namespace NKikimr {
Y_UNUSED(runtime);
auto it = TabletRelatedActors.find(parentId);
if (it != TabletRelatedActors.end()) {
- TabletRelatedActors.insert(std::make_pair(actorId, it->second));
+ TabletRelatedActors.insert(std::make_pair(actorId, it->second));
}
}
@@ -1149,7 +1149,7 @@ namespace NKikimr {
void Handle(TEvHive::TEvCreateTablet::TPtr& ev, const TActorContext& ctx) {
Cout << "FAKEHIVE " << TabletID() << " TEvCreateTablet " << ev->Get()->Record.ShortDebugString() << Endl;
NKikimrProto::EReplyStatus status = NKikimrProto::OK;
- const std::pair<ui64, ui64> key(ev->Get()->Record.GetOwner(), ev->Get()->Record.GetOwnerIdx());
+ const std::pair<ui64, ui64> key(ev->Get()->Record.GetOwner(), ev->Get()->Record.GetOwnerIdx());
const auto type = ev->Get()->Record.GetTabletType();
const auto bootMode = ev->Get()->Record.GetTabletBootMode();
auto it = State->Tablets.find(key);
@@ -1210,8 +1210,8 @@ namespace NKikimr {
it->second.ChannelsProfile = ev->Get()->Record.GetChannelsProfile();
}
- ctx.Send(ev->Sender, new TEvHive::TEvCreateTabletReply(status, key.first,
- key.second, it->second.TabletId, TabletID()), 0, ev->Cookie);
+ ctx.Send(ev->Sender, new TEvHive::TEvCreateTabletReply(status, key.first,
+ key.second, it->second.TabletId, TabletID()), 0, ev->Cookie);
}
void TraceAdoptingCases(const std::pair<ui64, ui64> prevKey,
diff --git a/ydb/core/tx/coordinator/coordinator_impl.h b/ydb/core/tx/coordinator/coordinator_impl.h
index 39018aff1e..939c05beef 100644
--- a/ydb/core/tx/coordinator/coordinator_impl.h
+++ b/ydb/core/tx/coordinator/coordinator_impl.h
@@ -218,7 +218,7 @@ class TTxCoordinator : public TActor<TTxCoordinator>, public TTabletExecutedFlat
if (it != Low.end())
return it->second;
std::pair<TMap<TStepId, TSlot>::iterator, bool> xit = Low.insert(TSlotQueue::value_type(step, TSlot()));
- TSlot &ret = xit.first->second;
+ TSlot &ret = xit.first->second;
return ret;
}
diff --git a/ydb/core/tx/mediator/execute_queue.cpp b/ydb/core/tx/mediator/execute_queue.cpp
index 07740e9f82..e73129b769 100644
--- a/ydb/core/tx/mediator/execute_queue.cpp
+++ b/ydb/core/tx/mediator/execute_queue.cpp
@@ -90,7 +90,7 @@ namespace NTxMediator {
const ui64 tttsize = coord.TabletsToTransaction.size();
while (readPos < tttsize) {
const std::pair<TTabletId, std::size_t> &x = coord.TabletsToTransaction[readPos];
- if (x.first != activeTablet)
+ if (x.first != activeTablet)
break;
currentTx.emplace_back(coord.Transactions[x.second]);
@@ -99,8 +99,8 @@ namespace NTxMediator {
if (readPos < tttsize) {
const std::pair<TTabletId, std::size_t> &x = coord.TabletsToTransaction[readPos];
- if (x.first < lookupTablet)
- lookupTablet = x.first;
+ if (x.first < lookupTablet)
+ lookupTablet = x.first;
}
}
@@ -135,10 +135,10 @@ namespace NTxMediator {
TTabletId activeTablet = 0;
for (TVector<std::pair<TTabletId, std::size_t>>::const_iterator it = step->TabletsToTransaction.begin(), end = step->TabletsToTransaction.end(); it != end; ++it) {
- if (activeTablet != it->first) {
+ if (activeTablet != it->first) {
if (activeTablet)
SendStepToBucket<TEvTxMediator::TEvOoOTabletStep>(activeTablet, step->Step, currentTx, ctx);
- activeTablet = it->first;
+ activeTablet = it->first;
currentTx.clear();
}
diff --git a/ydb/core/tx/mediator/mediator_impl.h b/ydb/core/tx/mediator/mediator_impl.h
index c98bd4246b..e0cdc05106 100644
--- a/ydb/core/tx/mediator/mediator_impl.h
+++ b/ydb/core/tx/mediator/mediator_impl.h
@@ -84,7 +84,7 @@ namespace NTxMediator {
if (TabletsToTransaction.size()) {
str << "TabletsToTransaction: {";
for (size_t i = 0; i < TabletsToTransaction.size(); ++i) {
- str << "{tablet# " << TabletsToTransaction[i].first;
+ str << "{tablet# " << TabletsToTransaction[i].first;
str << " txid# " << Transactions[TabletsToTransaction[i].second].TxId;
str << "}";
}
diff --git a/ydb/core/util/cache.h b/ydb/core/util/cache.h
index 916701ebc7..70a4b4cec4 100644
--- a/ydb/core/util/cache.h
+++ b/ydb/core/util/cache.h
@@ -378,7 +378,7 @@ public:
}
ui64 size = TSelf::Measure(key, value);
- it = Items.insert(std::make_pair(key, value)).first;
+ it = Items.insert(std::make_pair(key, value)).first;
currentValue = &it->second;
this->OnInsert(key, value, size);
return true;
@@ -541,7 +541,7 @@ public:
TSelf::PopWhileOverflow();
ui64 size = TSelf::Measure(key, value);
- indexIt = Index.insert(tmpItem).first;
+ indexIt = Index.insert(tmpItem).first;
List.PushFront(const_cast<TItem*>(&*indexIt));
currentValue = const_cast<TValue*>(&indexIt->Value);
this->OnInsert(key, value, size);
@@ -677,7 +677,7 @@ public:
auto inItem = InList.PopBack();
TItemKey tmpItemKey(inItem->Key);
- auto outInsertedIt = OutIndex.insert(tmpItemKey).first;
+ auto outInsertedIt = OutIndex.insert(tmpItemKey).first;
OutList.PushFront(const_cast<TItemKey*>(&*outInsertedIt));
ui64 size = TSelf::Measure(inItem->Key, inItem->Value);
@@ -734,11 +734,11 @@ public:
ui64 size = TSelf::Measure(key, value);
if (isOut) {
- auto insertedIt = MainIndex.insert(tmpItem).first;
+ auto insertedIt = MainIndex.insert(tmpItem).first;
MainList.PushFront(const_cast<TItem*>(&*insertedIt));
currentValue = const_cast<TValue*>(&insertedIt->Value);
} else {
- auto insertedIt = InIndex.insert(tmpItem).first;
+ auto insertedIt = InIndex.insert(tmpItem).first;
InList.PushFront(const_cast<TItem*>(&*insertedIt));
InSize += size;
currentValue = const_cast<TValue*>(&insertedIt->Value);
diff --git a/ydb/library/yql/minikql/comp_nodes/ut/mkql_dict_ut.cpp b/ydb/library/yql/minikql/comp_nodes/ut/mkql_dict_ut.cpp
index ac6d4c356b..890da52054 100644
--- a/ydb/library/yql/minikql/comp_nodes/ut/mkql_dict_ut.cpp
+++ b/ydb/library/yql/minikql/comp_nodes/ut/mkql_dict_ut.cpp
@@ -18,9 +18,9 @@ Y_UNIT_TEST_SUITE(TMiniKQLDictRelatedNodesTest) {
const auto payload2 = pgmBuilder.NewDataLiteral<NUdf::EDataSlot::String>("B");
const auto payload3 = pgmBuilder.NewDataLiteral<NUdf::EDataSlot::String>("C");
TVector<std::pair<TRuntimeNode, TRuntimeNode>> dictItems;
- dictItems.push_back(std::make_pair(key1, payload1));
- dictItems.push_back(std::make_pair(key2, payload2));
- dictItems.push_back(std::make_pair(key3, payload3));
+ dictItems.push_back(std::make_pair(key1, payload1));
+ dictItems.push_back(std::make_pair(key2, payload2));
+ dictItems.push_back(std::make_pair(key3, payload3));
const auto dictType = pgmBuilder.NewDictType(pgmBuilder.NewDataType(NUdf::TDataType<ui32>::Id),
pgmBuilder.NewDataType(NUdf::TDataType<char*>::Id), false);
const auto dict = pgmBuilder.NewDict(dictType, dictItems);
@@ -42,9 +42,9 @@ Y_UNIT_TEST_SUITE(TMiniKQLDictRelatedNodesTest) {
const auto payload2 = pgmBuilder.NewDataLiteral<NUdf::EDataSlot::String>("B");
const auto payload3 = pgmBuilder.NewDataLiteral<NUdf::EDataSlot::String>("C");
TVector<std::pair<TRuntimeNode, TRuntimeNode>> dictItems;
- dictItems.push_back(std::make_pair(key1, payload1));
- dictItems.push_back(std::make_pair(key2, payload2));
- dictItems.push_back(std::make_pair(key3, payload3));
+ dictItems.push_back(std::make_pair(key1, payload1));
+ dictItems.push_back(std::make_pair(key2, payload2));
+ dictItems.push_back(std::make_pair(key3, payload3));
const auto dictType = pgmBuilder.NewDictType(pgmBuilder.NewDataType(NUdf::TDataType<ui32>::Id),
pgmBuilder.NewDataType(NUdf::TDataType<char*>::Id), false);
const auto dict = pgmBuilder.NewDict(dictType, dictItems);
@@ -80,9 +80,9 @@ Y_UNIT_TEST_SUITE(TMiniKQLDictRelatedNodesTest) {
const auto payload2 = pgmBuilder.NewDataLiteral<NUdf::EDataSlot::String>("B");
const auto payload3 = pgmBuilder.NewDataLiteral<NUdf::EDataSlot::String>("C");
TVector<std::pair<TRuntimeNode, TRuntimeNode>> dictItems;
- dictItems.push_back(std::make_pair(key1, payload1));
- dictItems.push_back(std::make_pair(key2, payload2));
- dictItems.push_back(std::make_pair(key3, payload3));
+ dictItems.push_back(std::make_pair(key1, payload1));
+ dictItems.push_back(std::make_pair(key2, payload2));
+ dictItems.push_back(std::make_pair(key3, payload3));
const auto dictType = pgmBuilder.NewDictType(pgmBuilder.NewDataType(NUdf::TDataType<ui32>::Id),
pgmBuilder.NewDataType(NUdf::TDataType<char*>::Id), false);
const auto dict = pgmBuilder.NewDict(dictType, dictItems);
@@ -242,7 +242,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLDictRelatedNodesTest) {
if (SortBeforeCompare) {
std::sort(items.begin(), items.end(), [](const std::pair<ui32, TString>& left, const std::pair<ui32, TString>& right) {
- return left.first < right.first;
+ return left.first < right.first;
});
}
diff --git a/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp b/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp
index f2b188ae47..2e29a76b8f 100644
--- a/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp
+++ b/ydb/library/yql/minikql/computation/mkql_computation_node_graph.cpp
@@ -91,8 +91,8 @@ private:
void Visit(TDictLiteral& node) override {
for (ui32 i = 0; i < node.GetItemsCount(); ++i) {
- AddNode(node.GetItem(i).first.GetNode());
- AddNode(node.GetItem(i).second.GetNode());
+ AddNode(node.GetItem(i).first.GetNode());
+ AddNode(node.GetItem(i).second.GetNode());
}
}
@@ -396,7 +396,7 @@ private:
items.reserve(node.GetItemsCount());
for (ui32 i = 0, e = node.GetItemsCount(); i < e; ++i) {
auto item = node.GetItem(i);
- items.push_back(std::make_pair(GetComputationNode(item.first.GetNode()), GetComputationNode(item.second.GetNode())));
+ items.push_back(std::make_pair(GetComputationNode(item.first.GetNode()), GetComputationNode(item.second.GetNode())));
}
AddNode(node, NodeFactory->CreateDictNode(std::move(items), types, isTuple, encoded ? keyType : nullptr));
diff --git a/ydb/library/yql/minikql/invoke_builtins/mkql_builtins.cpp b/ydb/library/yql/minikql/invoke_builtins/mkql_builtins.cpp
index ab991842f1..5bf0ae9d43 100644
--- a/ydb/library/yql/minikql/invoke_builtins/mkql_builtins.cpp
+++ b/ydb/library/yql/minikql/invoke_builtins/mkql_builtins.cpp
@@ -235,7 +235,7 @@ void TBuiltinFunctionRegistry::CalculateMetadataEtag() {
}
std::sort(operations.begin(), operations.end(), [](const TFunctionPair& x, const TFunctionPair& y) {
- return x.first < y.first;
+ return x.first < y.first;
});
ui64 hash = 0;
@@ -244,7 +244,7 @@ void TBuiltinFunctionRegistry::CalculateMetadataEtag() {
const ui64 nameLength = op.first.size();
hash = MurmurHash<ui64>(&nameLength, sizeof(nameLength), hash);
hash = MurmurHash<ui64>(op.first.data(), op.first.size(), hash);
- const auto& descriptions = *op.second;
+ const auto& descriptions = *op.second;
const ui64 descriptionCount = descriptions.size();
hash = MurmurHash<ui64>(&descriptionCount, sizeof(descriptionCount), hash);
for (const auto& description : descriptions) {
diff --git a/ydb/library/yql/minikql/mkql_function_registry.cpp b/ydb/library/yql/minikql/mkql_function_registry.cpp
index d3545ad138..cfc28c03f6 100644
--- a/ydb/library/yql/minikql/mkql_function_registry.cpp
+++ b/ydb/library/yql/minikql/mkql_function_registry.cpp
@@ -172,7 +172,7 @@ public:
}
}
- libIt = LoadedLibraries_.insert({ libraryPath, lib }).first;
+ libIt = LoadedLibraries_.insert({ libraryPath, lib }).first;
}
// (2) ensure that Register() func is present
diff --git a/ydb/library/yql/minikql/mkql_node.cpp b/ydb/library/yql/minikql/mkql_node.cpp
index 4c6f3e45ad..e86c7f0d9d 100644
--- a/ydb/library/yql/minikql/mkql_node.cpp
+++ b/ydb/library/yql/minikql/mkql_node.cpp
@@ -420,7 +420,7 @@ TDataLiteral* TDataLiteral::Create(const NUdf::TUnboxedValuePod& value, TDataTyp
void TDataLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
@@ -473,7 +473,7 @@ TStructType::TStructType(ui32 membersCount, std::pair<TInternName, TType*>* memb
TInternName lastMemberName;
for (size_t index = 0; index < membersCount; ++index) {
- const auto& name = Members[index].first;
+ const auto& name = Members[index].first;
MKQL_ENSURE(!name.Str().empty(), "Empty member name is not allowed");
MKQL_ENSURE(name.Str() > lastMemberName.Str(), "Member names are not sorted: "
@@ -488,7 +488,7 @@ TStructType* TStructType::Create(const std::pair<TString, TType*>* members, ui32
if (membersCount) {
allocatedMembers = static_cast<std::pair<TInternName, TType*>*>(env.AllocateBuffer(membersCount * sizeof(*allocatedMembers)));
for (ui32 i = 0; i < membersCount; ++i) {
- allocatedMembers[i] = std::make_pair(env.InternName(members[i].first), members[i].second);
+ allocatedMembers[i] = std::make_pair(env.InternName(members[i].first), members[i].second);
}
}
@@ -500,7 +500,7 @@ TStructType* TStructType::Create(ui32 membersCount, const TStructMember* members
if (membersCount) {
allocatedMembers = static_cast<std::pair<TInternName, TType*>*>(env.AllocateBuffer(membersCount * sizeof(*allocatedMembers)));
for (ui32 i = 0; i < membersCount; ++i) {
- allocatedMembers[i] = std::make_pair(env.InternName(members[i].Name), members[i].Type);
+ allocatedMembers[i] = std::make_pair(env.InternName(members[i].Name), members[i].Type);
}
}
@@ -515,9 +515,9 @@ bool TStructType::IsSameType(const TStructType& typeToCompare) const {
return false;
for (size_t index = 0; index < MembersCount; ++index) {
- if (Members[index].first != typeToCompare.Members[index].first)
+ if (Members[index].first != typeToCompare.Members[index].first)
return false;
- if (!Members[index].second->IsSameType(*typeToCompare.Members[index].second))
+ if (!Members[index].second->IsSameType(*typeToCompare.Members[index].second))
return false;
}
@@ -544,11 +544,11 @@ bool TStructType::IsConvertableTo(const TStructType& typeToCompare, bool ignoreT
void TStructType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
for (ui32 i = 0; i < MembersCount; ++i) {
auto& member = Members[i];
- auto memberIt = links.find(member.second);
+ auto memberIt = links.find(member.second);
if (memberIt != links.end()) {
- TNode* newNode = memberIt->second;
+ TNode* newNode = memberIt->second;
Y_VERIFY_DEBUG(member.second->Equals(*newNode));
- member.second = static_cast<TType*>(newNode);
+ member.second = static_cast<TType*>(newNode);
}
}
}
@@ -569,12 +569,12 @@ TNode* TStructType::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
if (MembersCount) {
allocatedMembers = static_cast<std::pair<TInternName, TType*>*>(env.AllocateBuffer(MembersCount * sizeof(*allocatedMembers)));
for (ui32 i = 0; i < MembersCount; ++i) {
- allocatedMembers[i].first = Members[i].first;
+ allocatedMembers[i].first = Members[i].first;
auto newNode = (TNode*)Members[i].second->GetCookie();
if (newNode) {
allocatedMembers[i].second = static_cast<TType*>(newNode);
} else {
- allocatedMembers[i].second = Members[i].second;
+ allocatedMembers[i].second = Members[i].second;
}
}
}
@@ -651,7 +651,7 @@ TStructLiteral* TStructLiteral::Create(ui32 valuesCount, const TRuntimeNode* val
void TStructLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
@@ -660,7 +660,7 @@ void TStructLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto& value = Values[i];
auto valueIt = links.find(value.GetNode());
if (valueIt != links.end()) {
- TNode* newNode = valueIt->second;
+ TNode* newNode = valueIt->second;
Y_VERIFY_DEBUG(value.GetNode()->Equals(*newNode));
value = TRuntimeNode(newNode, value.IsImmediate());
}
@@ -742,7 +742,7 @@ bool TListType::IsConvertableTo(const TListType& typeToCompare, bool ignoreTagge
void TListType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto itemTypeIt = links.find(GetItemType());
if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
+ TNode* newNode = itemTypeIt->second;
Y_VERIFY_DEBUG(GetItemType()->Equals(*newNode));
Data = static_cast<TType*>(newNode);
}
@@ -797,7 +797,7 @@ TListLiteral* TListLiteral::Create(TRuntimeNode* items, ui32 count, TListType* t
void TListLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
@@ -806,7 +806,7 @@ void TListLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto& item = Items[i];
auto itemIt = links.find(item.GetNode());
if (itemIt != links.end()) {
- TNode* newNode = itemIt->second;
+ TNode* newNode = itemIt->second;
Y_VERIFY_DEBUG(item.GetNode()->Equals(*newNode));
item = TRuntimeNode(newNode, item.IsImmediate());
}
@@ -993,7 +993,7 @@ bool TOptionalType::IsConvertableTo(const TOptionalType& typeToCompare, bool ign
void TOptionalType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto itemTypeIt = links.find(GetItemType());
if (itemTypeIt != links.end()) {
- TNode* newNode = itemTypeIt->second;
+ TNode* newNode = itemTypeIt->second;
Y_VERIFY_DEBUG(GetItemType()->Equals(*newNode));
Data = static_cast<TType*>(newNode);
}
@@ -1084,7 +1084,7 @@ TOptionalLiteral* TOptionalLiteral::Create(TRuntimeNode item, TOptionalType* typ
void TOptionalLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
@@ -1092,7 +1092,7 @@ void TOptionalLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
if (Item.GetNode()) {
auto itemIt = links.find(Item.GetNode());
if (itemIt != links.end()) {
- TNode* newNode = itemIt->second;
+ TNode* newNode = itemIt->second;
Y_VERIFY_DEBUG(Item.GetNode()->Equals(*newNode));
Item = TRuntimeNode(newNode, Item.IsImmediate());
}
@@ -1147,14 +1147,14 @@ bool TDictType::IsConvertableTo(const TDictType& typeToCompare, bool ignoreTagge
void TDictType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto keyTypeIt = links.find(KeyType);
if (keyTypeIt != links.end()) {
- TNode* newNode = keyTypeIt->second;
+ TNode* newNode = keyTypeIt->second;
Y_VERIFY_DEBUG(KeyType->Equals(*newNode));
KeyType = static_cast<TType*>(newNode);
}
auto payloadTypeIt = links.find(PayloadType);
if (payloadTypeIt != links.end()) {
- TNode* newNode = payloadTypeIt->second;
+ TNode* newNode = payloadTypeIt->second;
Y_VERIFY_DEBUG(PayloadType->Equals(*newNode));
PayloadType = static_cast<TType*>(newNode);
}
@@ -1191,7 +1191,7 @@ void TDictType::EnsureValidDictKey(TType* keyType) {
Y_UNUSED(keyType);
}
-TDictLiteral::TDictLiteral(ui32 itemsCount, std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type, bool validate)
+TDictLiteral::TDictLiteral(ui32 itemsCount, std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type, bool validate)
: TNode(type)
, ItemsCount(itemsCount)
, Items(items)
@@ -1199,8 +1199,8 @@ TDictLiteral::TDictLiteral(ui32 itemsCount, std::pair<TRuntimeNode, TRuntimeNode
if (!validate) {
for (size_t index = 0; index < itemsCount; ++index) {
auto& item = Items[index];
- item.first.Freeze();
- item.second.Freeze();
+ item.first.Freeze();
+ item.second.Freeze();
}
return;
@@ -1208,20 +1208,20 @@ TDictLiteral::TDictLiteral(ui32 itemsCount, std::pair<TRuntimeNode, TRuntimeNode
for (size_t index = 0; index < itemsCount; ++index) {
auto& item = Items[index];
- MKQL_ENSURE(item.first.GetStaticType()->IsSameType(*type->GetKeyType()), "Wrong type of key");
+ MKQL_ENSURE(item.first.GetStaticType()->IsSameType(*type->GetKeyType()), "Wrong type of key");
- MKQL_ENSURE(item.second.GetStaticType()->IsSameType(*type->GetPayloadType()), "Wrong type of payload");
+ MKQL_ENSURE(item.second.GetStaticType()->IsSameType(*type->GetPayloadType()), "Wrong type of payload");
- item.first.Freeze();
- item.second.Freeze();
+ item.first.Freeze();
+ item.second.Freeze();
}
}
-TDictLiteral* TDictLiteral::Create(ui32 itemsCount, const std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type,
+TDictLiteral* TDictLiteral::Create(ui32 itemsCount, const std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type,
const TTypeEnvironment& env) {
- std::pair<TRuntimeNode, TRuntimeNode>* allocatedItems = nullptr;
+ std::pair<TRuntimeNode, TRuntimeNode>* allocatedItems = nullptr;
if (itemsCount) {
- allocatedItems = static_cast<std::pair<TRuntimeNode, TRuntimeNode>*>(env.AllocateBuffer(itemsCount * sizeof(*allocatedItems)));
+ allocatedItems = static_cast<std::pair<TRuntimeNode, TRuntimeNode>*>(env.AllocateBuffer(itemsCount * sizeof(*allocatedItems)));
for (ui32 i = 0; i < itemsCount; ++i) {
allocatedItems[i] = items[i];
}
@@ -1233,25 +1233,25 @@ TDictLiteral* TDictLiteral::Create(ui32 itemsCount, const std::pair<TRuntimeNode
void TDictLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
for (ui32 i = 0; i < ItemsCount; ++i) {
auto& item = Items[i];
- auto itemKeyIt = links.find(item.first.GetNode());
+ auto itemKeyIt = links.find(item.first.GetNode());
if (itemKeyIt != links.end()) {
- TNode* newNode = itemKeyIt->second;
+ TNode* newNode = itemKeyIt->second;
Y_VERIFY_DEBUG(item.first.GetNode()->Equals(*newNode));
- item.first = TRuntimeNode(newNode, item.first.IsImmediate());
+ item.first = TRuntimeNode(newNode, item.first.IsImmediate());
}
- auto itemPayloadIt = links.find(item.second.GetNode());
+ auto itemPayloadIt = links.find(item.second.GetNode());
if (itemPayloadIt != links.end()) {
- TNode* newNode = itemPayloadIt->second;
+ TNode* newNode = itemPayloadIt->second;
Y_VERIFY_DEBUG(item.second.GetNode()->Equals(*newNode));
- item.second = TRuntimeNode(newNode, item.second.IsImmediate());
+ item.second = TRuntimeNode(newNode, item.second.IsImmediate());
}
}
}
@@ -1278,9 +1278,9 @@ TNode* TDictLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
if (!needClone)
return const_cast<TDictLiteral*>(this);
- std::pair<TRuntimeNode, TRuntimeNode>* allocatedItems = nullptr;
+ std::pair<TRuntimeNode, TRuntimeNode>* allocatedItems = nullptr;
if (ItemsCount) {
- allocatedItems = static_cast<std::pair<TRuntimeNode, TRuntimeNode>*>(env.AllocateBuffer(ItemsCount * sizeof(*allocatedItems)));
+ allocatedItems = static_cast<std::pair<TRuntimeNode, TRuntimeNode>*>(env.AllocateBuffer(ItemsCount * sizeof(*allocatedItems)));
for (ui32 i = 0; i < ItemsCount; ++i) {
allocatedItems[i] = Items[i];
auto newKeyNode = (TNode*)Items[i].first.GetNode()->GetCookie();
@@ -1302,8 +1302,8 @@ TNode* TDictLiteral::DoCloneOnCallableWrite(const TTypeEnvironment& env) const {
void TDictLiteral::DoFreeze(const TTypeEnvironment& env) {
Y_UNUSED(env);
for (ui32 i = 0; i < ItemsCount; ++i) {
- Items[i].first.Freeze();
- Items[i].second.Freeze();
+ Items[i].first.Freeze();
+ Items[i].second.Freeze();
}
}
@@ -1433,7 +1433,7 @@ void TCallableType::SetOptionalArgumentsCount(ui32 count) {
void TCallableType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto returnTypeIt = links.find(ReturnType);
if (returnTypeIt != links.end()) {
- TNode* newNode = returnTypeIt->second;
+ TNode* newNode = returnTypeIt->second;
Y_VERIFY_DEBUG(ReturnType->Equals(*newNode));
ReturnType = static_cast<TType*>(newNode);
}
@@ -1442,7 +1442,7 @@ void TCallableType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto& arg = Arguments[i];
auto argIt = links.find(arg);
if (argIt != links.end()) {
- TNode* newNode = argIt->second;
+ TNode* newNode = argIt->second;
Y_VERIFY_DEBUG(arg->Equals(*newNode));
arg = static_cast<TType*>(newNode);
}
@@ -1451,7 +1451,7 @@ void TCallableType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
if (Payload) {
auto payloadIt = links.find(Payload);
if (payloadIt != links.end()) {
- TNode* newNode = payloadIt->second;
+ TNode* newNode = payloadIt->second;
Y_VERIFY_DEBUG(Payload->Equals(*newNode));
Payload = newNode;
}
@@ -1559,7 +1559,7 @@ TCallable* TCallable::Create(TRuntimeNode result, TCallableType* type, const TTy
void TCallable::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
@@ -1568,7 +1568,7 @@ void TCallable::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto& input = Inputs[i];
auto inputIt = links.find(input.GetNode());
if (inputIt != links.end()) {
- TNode* newNode = inputIt->second;
+ TNode* newNode = inputIt->second;
Y_VERIFY_DEBUG(input.GetNode()->Equals(*newNode));
input = TRuntimeNode(newNode, input.IsImmediate());
}
@@ -1577,7 +1577,7 @@ void TCallable::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
if (Result.GetNode()) {
auto resultIt = links.find(Result.GetNode());
if (resultIt != links.end()) {
- TNode* newNode = resultIt->second;
+ TNode* newNode = resultIt->second;
Y_VERIFY_DEBUG(Result.GetNode()->Equals(*newNode));
Result = TRuntimeNode(newNode, Result.IsImmediate());
}
@@ -1850,7 +1850,7 @@ void TTupleType::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto& element = Elements[i];
auto elementIt = links.find(element);
if (elementIt != links.end()) {
- TNode* newNode = elementIt->second;
+ TNode* newNode = elementIt->second;
Y_VERIFY_DEBUG(element->Equals(*newNode));
element = static_cast<TType*>(newNode);
}
@@ -1928,7 +1928,7 @@ TTupleLiteral* TTupleLiteral::Create(ui32 valuesCount, const TRuntimeNode* value
void TTupleLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto typeIt = links.find(Type);
if (typeIt != links.end()) {
- TNode* newNode = typeIt->second;
+ TNode* newNode = typeIt->second;
Y_VERIFY_DEBUG(Type->Equals(*newNode));
Type = static_cast<TType*>(newNode);
}
@@ -1937,7 +1937,7 @@ void TTupleLiteral::DoUpdateLinks(const THashMap<TNode*, TNode*>& links) {
auto& value = Values[i];
auto valueIt = links.find(value.GetNode());
if (valueIt != links.end()) {
- TNode* newNode = valueIt->second;
+ TNode* newNode = valueIt->second;
Y_VERIFY_DEBUG(value.GetNode()->Equals(*newNode));
value = TRuntimeNode(newNode, value.IsImmediate());
}
diff --git a/ydb/library/yql/minikql/mkql_node.h b/ydb/library/yql/minikql/mkql_node.h
index ee74455ea6..1a1219ddf5 100644
--- a/ydb/library/yql/minikql/mkql_node.h
+++ b/ydb/library/yql/minikql/mkql_node.h
@@ -630,12 +630,12 @@ public:
TInternName GetMemberNameStr(ui32 index) const {
Y_VERIFY_DEBUG(index < MembersCount);
- return Members[index].first;
+ return Members[index].first;
}
TType* GetMemberType(ui32 index) const {
Y_VERIFY_DEBUG(index < MembersCount);
- return Members[index].second;
+ return Members[index].second;
}
ui32 GetMemberIndex(const TStringBuf& name) const;
@@ -892,7 +892,7 @@ private:
class TDictLiteral : public TNode {
friend class TNode;
public:
- static TDictLiteral* Create(ui32 itemsCount, const std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type, const TTypeEnvironment& env);
+ static TDictLiteral* Create(ui32 itemsCount, const std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type, const TTypeEnvironment& env);
TDictType* GetType() const {
return static_cast<TDictType*>(GetGenericType());
}
@@ -901,13 +901,13 @@ public:
return ItemsCount;
}
- std::pair<TRuntimeNode, TRuntimeNode> GetItem(ui32 index) const {
+ std::pair<TRuntimeNode, TRuntimeNode> GetItem(ui32 index) const {
Y_VERIFY_DEBUG(index < ItemsCount);
return Items[index];
}
private:
- TDictLiteral(ui32 itemsCount, std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type, bool validate = true);
+ TDictLiteral(ui32 itemsCount, std::pair<TRuntimeNode, TRuntimeNode>* items, TDictType* type, bool validate = true);
using TNode::Equals;
bool Equals(const TDictLiteral& nodeToCompare) const;
@@ -917,7 +917,7 @@ private:
private:
ui32 ItemsCount;
- std::pair<TRuntimeNode, TRuntimeNode>* Items;
+ std::pair<TRuntimeNode, TRuntimeNode>* Items;
};
class TCallableType : public TType {
diff --git a/ydb/library/yql/minikql/mkql_node_builder.cpp b/ydb/library/yql/minikql/mkql_node_builder.cpp
index 34466b8944..d37b87f276 100644
--- a/ydb/library/yql/minikql/mkql_node_builder.cpp
+++ b/ydb/library/yql/minikql/mkql_node_builder.cpp
@@ -153,20 +153,20 @@ TStructLiteral* TStructLiteralBuilder::Build() {
TVector<std::pair<TStringBuf, ui32>> sortedIndicies(Members.size());
for (ui32 i = 0, e = Members.size(); i < e; ++i) {
- sortedIndicies[i] = std::make_pair(Members[i].Name, i);
+ sortedIndicies[i] = std::make_pair(Members[i].Name, i);
}
Sort(sortedIndicies.begin(), sortedIndicies.end(),
- [](const std::pair<TStringBuf, ui32>& x, const std::pair<TStringBuf, ui32>& y) {
- return x.first < y.first;
+ [](const std::pair<TStringBuf, ui32>& x, const std::pair<TStringBuf, ui32>& y) {
+ return x.first < y.first;
});
TVector<TStructMember> sortedMembers(Members.size());
TVector<TRuntimeNode> sortedValues(Members.size());
for (ui32 i = 0, e = Members.size(); i < e; ++i) {
- sortedMembers[i] = Members[sortedIndicies[i].second];
- sortedValues[i] = Values[sortedIndicies[i].second];
+ sortedMembers[i] = Members[sortedIndicies[i].second];
+ sortedValues[i] = Values[sortedIndicies[i].second];
}
auto type = TStructType::Create(sortedMembers.size(), sortedMembers.data(), *Env);
@@ -208,7 +208,7 @@ void TDictLiteralBuilder::Reserve(ui32 size) {
}
TDictLiteralBuilder& TDictLiteralBuilder::Add(TRuntimeNode key, TRuntimeNode payload) {
- Items.push_back(std::make_pair(key, payload));
+ Items.push_back(std::make_pair(key, payload));
return *this;
}
diff --git a/ydb/library/yql/minikql/mkql_node_printer.cpp b/ydb/library/yql/minikql/mkql_node_printer.cpp
index f7515a3005..39905ac2c5 100644
--- a/ydb/library/yql/minikql/mkql_node_printer.cpp
+++ b/ydb/library/yql/minikql/mkql_node_printer.cpp
@@ -599,12 +599,12 @@ namespace {
for (ui32 index = 0; index < node.GetItemsCount(); ++index) {
WriteIndentation();
const auto& item = node.GetItem(index);
- Out << "Key of item #" << index << ", " << (item.first.IsImmediate() ? "immediate" : "not immediate") << " {";
+ Out << "Key of item #" << index << ", " << (item.first.IsImmediate() ? "immediate" : "not immediate") << " {";
WriteNewline();
{
TIndentScope scope2(this);
- item.first.GetNode()->Accept(*this);
+ item.first.GetNode()->Accept(*this);
}
WriteIndentation();
@@ -612,12 +612,12 @@ namespace {
WriteNewline();
WriteIndentation();
- Out << "Payload of item #" << index << ", " << (item.second.IsImmediate() ? "immediate" : "not immediate") << " {";
+ Out << "Payload of item #" << index << ", " << (item.second.IsImmediate() ? "immediate" : "not immediate") << " {";
WriteNewline();
{
TIndentScope scope2(this);
- item.second.GetNode()->Accept(*this);
+ item.second.GetNode()->Accept(*this);
}
WriteIndentation();
diff --git a/ydb/library/yql/minikql/mkql_node_serialization.cpp b/ydb/library/yql/minikql/mkql_node_serialization.cpp
index e314f38cd6..73594d9fd9 100644
--- a/ydb/library/yql/minikql/mkql_node_serialization.cpp
+++ b/ydb/library/yql/minikql/mkql_node_serialization.cpp
@@ -446,8 +446,8 @@ namespace {
Owner.WriteVar32(node.GetItemsCount());
for (ui32 i = node.GetItemsCount(); i-- > 0;) {
auto item = node.GetItem(i);
- Owner.AddChildNode(*item.second.GetNode());
- Owner.AddChildNode(*item.first.GetNode());
+ Owner.AddChildNode(*item.second.GetNode());
+ Owner.AddChildNode(*item.first.GetNode());
}
Owner.AddChildNode(*type);
@@ -778,11 +778,11 @@ namespace {
TStackVec<char> immediateFlags(GetBitmapBytes(node.GetItemsCount() * 2));
for (ui32 i = 0, e = node.GetItemsCount(); i < e; ++i) {
auto item = node.GetItem(i);
- if (item.first.IsImmediate()) {
+ if (item.first.IsImmediate()) {
SetBitmapBit(immediateFlags.data(), 2 * i);
}
- if (item.second.IsImmediate()) {
+ if (item.second.IsImmediate()) {
SetBitmapBit(immediateFlags.data(), 2 * i + 1);
}
}
@@ -852,13 +852,13 @@ namespace {
Begin(node.IsImmediate());
TPreVisitor preVisitor(*this);
TPostVisitor postVisitor(*this);
- Stack.push_back(std::make_pair(node.GetNode(), false));
+ Stack.push_back(std::make_pair(node.GetNode(), false));
while (!Stack.empty()) {
auto& nodeAndFlag = Stack.back();
- if (!nodeAndFlag.second) {
- nodeAndFlag.second = true;
+ if (!nodeAndFlag.second) {
+ nodeAndFlag.second = true;
auto prevSize = Stack.size();
- nodeAndFlag.first->Accept(preVisitor);
+ nodeAndFlag.first->Accept(preVisitor);
if (preVisitor.IsProcessed()) { // ref or small node, some nodes have been added
Y_VERIFY_DEBUG(prevSize == Stack.size());
Stack.pop_back();
@@ -868,7 +868,7 @@ namespace {
Y_VERIFY_DEBUG(prevSize <= Stack.size());
} else {
auto prevSize = Stack.size();
- nodeAndFlag.first->Accept(postVisitor);
+ nodeAndFlag.first->Accept(postVisitor);
Y_VERIFY_DEBUG(prevSize == Stack.size());
Stack.pop_back();
}
@@ -885,7 +885,7 @@ namespace {
void Begin(bool isImmediate) {
Write(SystemMask | (isImmediate ? (char)ESystemCommand::Begin : (char)ESystemCommand::BeginNotImmediate));
for (auto it = Names.begin(); it != Names.end();) {
- if (it->second <= 1) {
+ if (it->second <= 1) {
Names.erase(it++);
} else {
++it;
@@ -899,10 +899,10 @@ namespace {
if (it == Names.end()) {
continue;
}
- const auto& name = it->first;
+ const auto& name = it->first;
WriteVar32(name.Str().size());
WriteMany(name.Str().data(), name.Str().size());
- it->second = nameIndex++;
+ it->second = nameIndex++;
}
Y_VERIFY_DEBUG(nameIndex == Names.size());
@@ -913,7 +913,7 @@ namespace {
}
void AddChildNode(TNode& node) {
- Stack.push_back(std::make_pair(&node, false));
+ Stack.push_back(std::make_pair(&node, false));
}
void RegisterReference(TNode& node) {
@@ -934,7 +934,7 @@ namespace {
WriteVar32(name.Str().size() << 1);
WriteMany(name.Str().data(), name.Str().size());
} else {
- WriteVar32((it->second << 1) | NameRefMark);
+ WriteVar32((it->second << 1) | NameRefMark);
}
}
@@ -1006,7 +1006,7 @@ namespace {
lastPos = Current;
}
- NodeStack.push_back(std::make_pair(newNode, Current));
+ NodeStack.push_back(std::make_pair(newNode, Current));
CtxStack.pop_back();
continue;
}
@@ -1106,8 +1106,8 @@ namespace {
auto nodeAndFinish = NodeStack.back();
NodeStack.pop_back();
- Current = nodeAndFinish.second;
- return nodeAndFinish.first;
+ Current = nodeAndFinish.second;
+ return nodeAndFinish.first;
}
TNode* PeekNode(ui32 index) {
@@ -1115,8 +1115,8 @@ namespace {
ThrowCorrupted();
auto nodeAndFinish = NodeStack[NodeStack.size() - 1 - index];
- Current = nodeAndFinish.second;
- return nodeAndFinish.first;
+ Current = nodeAndFinish.second;
+ return nodeAndFinish.first;
}
TNode* ReadNode() {
@@ -1853,18 +1853,18 @@ namespace {
ThrowCorrupted();
auto dictType = static_cast<TDictType*>(type);
- TStackVec<std::pair<TRuntimeNode, TRuntimeNode>> items(itemsCount);
+ TStackVec<std::pair<TRuntimeNode, TRuntimeNode>> items(itemsCount);
for (ui32 i = 0; i < itemsCount; ++i) {
auto key = PopNode();
auto payload = PopNode();
- items[i].first = TRuntimeNode(key, false);
- items[i].second = TRuntimeNode(payload, false);
+ items[i].first = TRuntimeNode(key, false);
+ items[i].second = TRuntimeNode(payload, false);
}
const char* immediateFlags = ReadMany(GetBitmapBytes(itemsCount * 2));
for (ui32 i = 0; i < itemsCount; ++i) {
- items[i].first = TRuntimeNode(items[i].first.GetNode(), GetBitmapBit(immediateFlags, 2 * i));
- items[i].second = TRuntimeNode(items[i].second.GetNode(), GetBitmapBit(immediateFlags, 2 * i + 1));
+ items[i].first = TRuntimeNode(items[i].first.GetNode(), GetBitmapBit(immediateFlags, 2 * i));
+ items[i].second = TRuntimeNode(items[i].second.GetNode(), GetBitmapBit(immediateFlags, 2 * i + 1));
}
auto node = TDictLiteral::Create(itemsCount, items.data(), dictType, Env);
diff --git a/ydb/library/yql/minikql/mkql_node_ut.cpp b/ydb/library/yql/minikql/mkql_node_ut.cpp
index 1612627246..d670d24b5d 100644
--- a/ydb/library/yql/minikql/mkql_node_ut.cpp
+++ b/ydb/library/yql/minikql/mkql_node_ut.cpp
@@ -80,8 +80,8 @@ Y_UNIT_TEST_SUITE(TMiniKQLNodeTest) {
UNIT_ASSERT_EQUAL(s1->GetMemberType(0)->GetKind(), TType::EKind::Void);
TVector<std::pair<TString, TType*>> s2members;
- s2members.push_back(std::make_pair("bbb", env.GetEmptyStruct()->GetGenericType()));
- s2members.push_back(std::make_pair("ccc", env.GetTypeOfVoid()));
+ s2members.push_back(std::make_pair("bbb", env.GetEmptyStruct()->GetGenericType()));
+ s2members.push_back(std::make_pair("ccc", env.GetTypeOfVoid()));
TStructType* s2 = TStructType::Create(s2members.data(), s2members.size(), env);
UNIT_ASSERT_EQUAL(s2->GetMembersCount(), 2);
UNIT_ASSERT_EQUAL(s2->GetMemberName(0), "bbb");
@@ -90,7 +90,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLNodeTest) {
UNIT_ASSERT_EQUAL(s2->GetMemberType(1)->GetKind(), TType::EKind::Void);
TVector<std::pair<TString, TType*>> s3members;
- s3members.push_back(std::make_pair("", env.GetEmptyStruct()->GetGenericType()));
+ s3members.push_back(std::make_pair("", env.GetEmptyStruct()->GetGenericType()));
UNIT_ASSERT_EXCEPTION(TStructType::Create(s3members.data(), s3members.size(), env), yexception);
TStructType* s2cloned = TStructType::Create(s2members.data(), s2members.size(), env);
@@ -316,23 +316,23 @@ Y_UNIT_TEST_SUITE(TMiniKQLNodeTest) {
TString u = "34567";
TVector<std::pair<TRuntimeNode, TRuntimeNode>> someItems;
- someItems.push_back(std::make_pair(TRuntimeNode(TDataLiteral::Create(
+ someItems.push_back(std::make_pair(TRuntimeNode(TDataLiteral::Create(
NUdf::TUnboxedValuePod::Embedded(u), dtype1, env), true),
TRuntimeNode(TDataLiteral::Create(
NUdf::TUnboxedValuePod((ui32)13), dtype2, env), true)));
u = "878";
- someItems.push_back(std::make_pair(TRuntimeNode(TDataLiteral::Create(
+ someItems.push_back(std::make_pair(TRuntimeNode(TDataLiteral::Create(
NUdf::TUnboxedValuePod::Embedded(u), dtype1, env), true),
TRuntimeNode(TDataLiteral::Create(NUdf::TUnboxedValuePod((ui32)14), dtype2, env), true)));
TDictLiteral* dict2 = TDictLiteral::Create(someItems.size(), someItems.data(), dict2Type, env);
UNIT_ASSERT_EQUAL(dict2->GetItemsCount(), 2);
- UNIT_ASSERT_EQUAL(dict2->GetItem(0).first.GetNode()->GetType()->GetKind(), TType::EKind::Data);
+ UNIT_ASSERT_EQUAL(dict2->GetItem(0).first.GetNode()->GetType()->GetKind(), TType::EKind::Data);
UNIT_ASSERT_EQUAL(static_cast<const TDataLiteral&>(*dict2->GetItem(0).first.GetNode()).AsValue().AsStringRef(), NUdf::TStringRef::Of("34567"));
- UNIT_ASSERT_EQUAL(dict2->GetItem(0).second.GetNode()->GetType()->GetKind(), TType::EKind::Data);
+ UNIT_ASSERT_EQUAL(dict2->GetItem(0).second.GetNode()->GetType()->GetKind(), TType::EKind::Data);
UNIT_ASSERT_EQUAL(static_cast<const TDataLiteral&>(*dict2->GetItem(0).second.GetNode()).AsValue().Get<ui32>(), 13);
- UNIT_ASSERT_EQUAL(dict2->GetItem(1).first.GetNode()->GetType()->GetKind(), TType::EKind::Data);
+ UNIT_ASSERT_EQUAL(dict2->GetItem(1).first.GetNode()->GetType()->GetKind(), TType::EKind::Data);
UNIT_ASSERT_EQUAL(static_cast<const TDataLiteral&>(*dict2->GetItem(1).first.GetNode()).AsValue().AsStringRef(), NUdf::TStringRef::Of("878"));
- UNIT_ASSERT_EQUAL(dict2->GetItem(1).second.GetNode()->GetType()->GetKind(), TType::EKind::Data);
+ UNIT_ASSERT_EQUAL(dict2->GetItem(1).second.GetNode()->GetType()->GetKind(), TType::EKind::Data);
UNIT_ASSERT_EQUAL(static_cast<const TDataLiteral&>(*dict2->GetItem(1).second.GetNode()).AsValue().Get<ui32>(), 14);
UNIT_ASSERT_EXCEPTION(TDictLiteral::Create(someItems.size(), someItems.data(), dict1Type, env), yexception);
@@ -342,7 +342,7 @@ Y_UNIT_TEST_SUITE(TMiniKQLNodeTest) {
TVector<std::pair<TRuntimeNode, TRuntimeNode>> someDynItems;
TCallableType* ctype = TCallableType::Create("c1", dtype1, 0, nullptr, nullptr, env);
- someDynItems.push_back(std::make_pair(
+ someDynItems.push_back(std::make_pair(
TRuntimeNode(TCallable::Create(0, nullptr, ctype, env), false),
TRuntimeNode(TDataLiteral::Create(NUdf::TUnboxedValuePod((ui32)123), dtype2, env), true)));
diff --git a/ydb/library/yql/minikql/mkql_opt_literal.cpp b/ydb/library/yql/minikql/mkql_opt_literal.cpp
index 832a87ea80..f7d086a488 100644
--- a/ydb/library/yql/minikql/mkql_opt_literal.cpp
+++ b/ydb/library/yql/minikql/mkql_opt_literal.cpp
@@ -333,7 +333,7 @@ struct TOptimizationFuncMapFiller {
Provider = [&](TInternName name) {
auto it = Map.find(name.Str());
if (it != Map.end())
- return it->second;
+ return it->second;
return TCallableVisitFunc();
};