diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
commit | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch) | |
tree | 506dac10f5df94fab310584ee51b24fc5a081c22 /library/cpp/containers | |
parent | 2d37894b1b037cf24231090eda8589bbb44fb6fc (diff) | |
download | ydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers')
-rw-r--r-- | library/cpp/containers/comptrie/comptrie_ut.cpp | 2 | ||||
-rw-r--r-- | library/cpp/containers/comptrie/key_selector.h | 2 | ||||
-rw-r--r-- | library/cpp/containers/comptrie/protopacker.h | 4 | ||||
-rw-r--r-- | library/cpp/containers/stack_array/stack_array.h | 4 | ||||
-rw-r--r-- | library/cpp/containers/stack_array/ut/tests_ut.cpp | 4 | ||||
-rw-r--r-- | library/cpp/containers/stack_vector/stack_vec.h | 28 | ||||
-rw-r--r-- | library/cpp/containers/stack_vector/stack_vec_ut.cpp | 12 |
7 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/containers/comptrie/comptrie_ut.cpp b/library/cpp/containers/comptrie/comptrie_ut.cpp index 74bee09b5d..0ae4bc3a83 100644 --- a/library/cpp/containers/comptrie/comptrie_ut.cpp +++ b/library/cpp/containers/comptrie/comptrie_ut.cpp @@ -1296,7 +1296,7 @@ void TCompactTrieTest::TestFindLongestPrefixWithEmptyValue() { template <typename TChar> struct TConvertKey { static inline TString Convert(const TStringBuf& key) { - return ToString(key); + return ToString(key); } }; diff --git a/library/cpp/containers/comptrie/key_selector.h b/library/cpp/containers/comptrie/key_selector.h index 60466cef71..f156d6a909 100644 --- a/library/cpp/containers/comptrie/key_selector.h +++ b/library/cpp/containers/comptrie/key_selector.h @@ -12,7 +12,7 @@ struct TCompactTrieKeySelector { template <class TChar> struct TCompactTrieCharKeySelector { - typedef TBasicString<TChar> TKey; + typedef TBasicString<TChar> TKey; typedef TBasicStringBuf<TChar> TKeyBuf; }; diff --git a/library/cpp/containers/comptrie/protopacker.h b/library/cpp/containers/comptrie/protopacker.h index 3e15866dc5..038c870528 100644 --- a/library/cpp/containers/comptrie/protopacker.h +++ b/library/cpp/containers/comptrie/protopacker.h @@ -10,12 +10,12 @@ public: void UnpackLeaf(const char* p, Proto& entry) const { TMemoryInput in(p + sizeof(ui32), SkipLeaf(p) - sizeof(ui32)); - entry.ParseFromArcadiaStream(&in); + entry.ParseFromArcadiaStream(&in); } void PackLeaf(char* p, const Proto& entry, size_t size) const { TMemoryOutput out(p, size + sizeof(ui32)); Save<ui32>(&out, size); - entry.SerializeToArcadiaStream(&out); + entry.SerializeToArcadiaStream(&out); } size_t MeasureLeaf(const Proto& entry) const { return entry.ByteSize() + sizeof(ui32); diff --git a/library/cpp/containers/stack_array/stack_array.h b/library/cpp/containers/stack_array/stack_array.h index 28e49bfc3c..acbe68084f 100644 --- a/library/cpp/containers/stack_array/stack_array.h +++ b/library/cpp/containers/stack_array/stack_array.h @@ -28,11 +28,11 @@ namespace NStackArray { inline TStackArray(void* data, size_t len) : TArrayRef<T>((T*)data, len) { - NRangeOps::InitializeRange(this->begin(), this->end()); + NRangeOps::InitializeRange(this->begin(), this->end()); } inline ~TStackArray() { - NRangeOps::DestroyRange(this->begin(), this->end()); + NRangeOps::DestroyRange(this->begin(), this->end()); } }; } diff --git a/library/cpp/containers/stack_array/ut/tests_ut.cpp b/library/cpp/containers/stack_array/ut/tests_ut.cpp index 3e96384f0e..02e81f7243 100644 --- a/library/cpp/containers/stack_array/ut/tests_ut.cpp +++ b/library/cpp/containers/stack_array/ut/tests_ut.cpp @@ -15,9 +15,9 @@ Y_UNIT_TEST_SUITE(TestStackArray) { Y_UNIT_TEST(Test1) { TStackArray<ui32> s(ALLOC(ui32, 10)); - UNIT_ASSERT_VALUES_EQUAL(s.size(), 10); + UNIT_ASSERT_VALUES_EQUAL(s.size(), 10); - for (size_t i = 0; i < s.size(); ++i) { + for (size_t i = 0; i < s.size(); ++i) { UNIT_ASSERT_VALUES_EQUAL(s[i], 0xCCCCCCCC); } diff --git a/library/cpp/containers/stack_vector/stack_vec.h b/library/cpp/containers/stack_vector/stack_vec.h index fcc5d9a2a5..02bd049629 100644 --- a/library/cpp/containers/stack_vector/stack_vec.h +++ b/library/cpp/containers/stack_vector/stack_vec.h @@ -57,22 +57,22 @@ namespace NPrivate { : Alloc(std::forward<TArgs>(args)...) {} - T* allocate(size_type n) { + T* allocate(size_type n) { if (!IsStorageUsed && CountOnStack >= n) { IsStorageUsed = true; - return reinterpret_cast<T*>(&StackBasedStorage[0]); + return reinterpret_cast<T*>(&StackBasedStorage[0]); } else { if constexpr (!UseFallbackAlloc) { Y_FAIL( "Stack storage overflow. Capacity: %d, requested: %d", (int)CountOnStack, int(n)); } - return FallbackAllocator().allocate(n); + return FallbackAllocator().allocate(n); } } - void deallocate(T* p, size_type n) { - if (p >= reinterpret_cast<T*>(&StackBasedStorage[0]) && - p < reinterpret_cast<T*>(&StackBasedStorage[CountOnStack])) { + void deallocate(T* p, size_type n) { + if (p >= reinterpret_cast<T*>(&StackBasedStorage[0]) && + p < reinterpret_cast<T*>(&StackBasedStorage[CountOnStack])) { Y_VERIFY(IsStorageUsed); IsStorageUsed = false; } else { @@ -93,10 +93,10 @@ namespace NPrivate { template <typename T, size_t CountOnStack, bool UseFallbackAlloc, class Alloc> class TStackVec: public TVector<T, ::NPrivate::TStackBasedAllocator<T, CountOnStack, UseFallbackAlloc, TReboundAllocator<Alloc, T>>> { -private: - using TBase = TVector<T, ::NPrivate::TStackBasedAllocator<T, CountOnStack, UseFallbackAlloc, TReboundAllocator<Alloc, T>>>; +private: + using TBase = TVector<T, ::NPrivate::TStackBasedAllocator<T, CountOnStack, UseFallbackAlloc, TReboundAllocator<Alloc, T>>>; using TAllocator = typename TBase::allocator_type; - + public: using typename TBase::const_iterator; using typename TBase::const_reverse_iterator; @@ -130,7 +130,7 @@ public: TBase::assign(count, val); } - TStackVec(const TStackVec& src) + TStackVec(const TStackVec& src) : TStackVec(src.begin(), src.end()) { } @@ -167,21 +167,21 @@ public: } public: - void swap(TStackVec&) = delete; + void swap(TStackVec&) = delete; void shrink_to_fit() = delete; - TStackVec& operator=(const TStackVec& src) { + TStackVec& operator=(const TStackVec& src) { TBase::assign(src.begin(), src.end()); return *this; } template <class A> - TStackVec& operator=(const TVector<T, A>& src) { + TStackVec& operator=(const TVector<T, A>& src) { TBase::assign(src.begin(), src.end()); return *this; } - TStackVec& operator=(std::initializer_list<T> il) { + TStackVec& operator=(std::initializer_list<T> il) { TBase::assign(il.begin(), il.end()); return *this; } diff --git a/library/cpp/containers/stack_vector/stack_vec_ut.cpp b/library/cpp/containers/stack_vector/stack_vec_ut.cpp index 19f9677781..cca1c0a7cc 100644 --- a/library/cpp/containers/stack_vector/stack_vec_ut.cpp +++ b/library/cpp/containers/stack_vector/stack_vec_ut.cpp @@ -59,12 +59,12 @@ Y_UNIT_TEST_SUITE(TStackBasedVectorTest) { } Y_UNIT_TEST(TestReallyOnStack) { - const TStackVec<int> vec(5); - - UNIT_ASSERT( - (const char*)&vec <= (const char*)&vec[0] && - (const char*)&vec[0] <= (const char*)&vec + sizeof(vec) - ); + const TStackVec<int> vec(5); + + UNIT_ASSERT( + (const char*)&vec <= (const char*)&vec[0] && + (const char*)&vec[0] <= (const char*)&vec + sizeof(vec) + ); } Y_UNIT_TEST(TestFallback) { |