aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers
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 /library/cpp/containers
parent5598c5e7bc7619bd51d87fea7b880b7788ad0b47 (diff)
downloadydb-246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae.tar.gz
Restoring authorship annotation for <mihaild@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers')
-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
6 files changed, 28 insertions, 28 deletions
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);
}