diff options
author | mihaild <mihaild@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
commit | 246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae (patch) | |
tree | 2a65611ade91c8ae2f55647107c1a11ea743abd5 /library | |
parent | 5598c5e7bc7619bd51d87fea7b880b7788ad0b47 (diff) | |
download | ydb-246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae.tar.gz |
Restoring authorship annotation for <mihaild@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
33 files changed, 91 insertions, 91 deletions
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> |