diff options
author | aosipenko <aosipenko@yandex-team.ru> | 2022-02-10 16:48:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:08 +0300 |
commit | 69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/containers | |
parent | 948fd24d47d4b3b7815aaef1686aea00ef3f4288 (diff) | |
download | ydb-69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f.tar.gz |
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers')
4 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/containers/compact_vector/compact_vector.h b/library/cpp/containers/compact_vector/compact_vector.h index 51282f52fd..dbe7473f0c 100644 --- a/library/cpp/containers/compact_vector/compact_vector.h +++ b/library/cpp/containers/compact_vector/compact_vector.h @@ -59,7 +59,7 @@ public: } catch (...) { } } - if (Ptr) + if (Ptr) free(Header()); } @@ -120,7 +120,7 @@ public: } size_t Size() const { - return Ptr ? Header()->Size : 0; + return Ptr ? Header()->Size : 0; } size_t size() const { @@ -136,7 +136,7 @@ public: } size_t Capacity() const { - return Ptr ? Header()->Capacity : 0; + return Ptr ? Header()->Capacity : 0; } void PushBack(const T& elem) { diff --git a/library/cpp/containers/comptrie/comptrie_builder.inl b/library/cpp/containers/comptrie/comptrie_builder.inl index 51a6f976d0..f273fa6571 100644 --- a/library/cpp/containers/comptrie/comptrie_builder.inl +++ b/library/cpp/containers/comptrie/comptrie_builder.inl @@ -160,8 +160,8 @@ public: return 0; size_t median = (from + to) / 2; - size_t leftsize = (size_t)MeasureRange(builder, from, median); - size_t rightsize = (size_t)MeasureRange(builder, median + 1, to); + size_t leftsize = (size_t)MeasureRange(builder, from, median); + size_t rightsize = (size_t)MeasureRange(builder, median + 1, to); return builder->ArcMeasure(&(*this)[median], leftsize, rightsize); } @@ -825,7 +825,7 @@ void TCompactTrieBuilder<T, D, S>::TCompactTrieBuilderImpl::NodeLinkTo(TNode* th template <class T, class D, class S> size_t TCompactTrieBuilder<T, D, S>::TCompactTrieBuilderImpl::NodeMeasureSubtree(TNode* thiz) const { - return (size_t)thiz->Subtree()->Measure(this); + return (size_t)thiz->Subtree()->Measure(this); } template <class T, class D, class S> diff --git a/library/cpp/containers/comptrie/comptrie_trie.h b/library/cpp/containers/comptrie/comptrie_trie.h index 63e3e50304..40ec1e52b3 100644 --- a/library/cpp/containers/comptrie/comptrie_trie.h +++ b/library/cpp/containers/comptrie/comptrie_trie.h @@ -655,7 +655,7 @@ typename TCompactTrie<T, D, S>::TData TCompactTrie<T, D, S>::TConstIterator::Get template <class T, class D, class S> void TCompactTrie<T, D, S>::TConstIterator::GetValue(typename TCompactTrie<T, D, S>::TData& data) const { const char* ptr = GetValuePtr(); - if (ptr) { + if (ptr) { Packer.UnpackLeaf(ptr, data); } else { data = typename TCompactTrie<T, D, S>::TData(); diff --git a/library/cpp/containers/comptrie/comptrie_ut.cpp b/library/cpp/containers/comptrie/comptrie_ut.cpp index 969518fa1f..74bee09b5d 100644 --- a/library/cpp/containers/comptrie/comptrie_ut.cpp +++ b/library/cpp/containers/comptrie/comptrie_ut.cpp @@ -340,13 +340,13 @@ static bool LexicographicStep(TString& s) { template <class T> void TCompactTrieTest::CheckUpperBound(const char* data, size_t datalen) { TCompactTrie<T> trie(data, datalen); - typedef typename TCompactTrie<T>::TKey TKey; - typedef typename TCompactTrie<T>::TData TData; + typedef typename TCompactTrie<T>::TKey TKey; + typedef typename TCompactTrie<T>::TData TData; TString key; do { const TKey wideKey = MakeWideKey<T>(key); - typename TCompactTrie<T>::TConstIterator it = trie.UpperBound(wideKey); + typename TCompactTrie<T>::TConstIterator it = trie.UpperBound(wideKey); UNIT_ASSERT_C(it == trie.End() || it.GetKey() >= wideKey, "key=" + key); TData data; const bool found = trie.Find(wideKey, &data); @@ -454,7 +454,7 @@ void TCompactTrieTest::CheckIterator(const char* data, size_t datalen) { std::reverse(items.begin(), items.end()); typename TCompactTrie<T>::TConstIterator revIt = trie.End(); typename TCompactTrie<T>::TConstIterator const begin = trie.Begin(); - typename TCompactTrie<T>::TConstIterator emptyIt; + typename TCompactTrie<T>::TConstIterator emptyIt; size_t pos = 0; while (revIt != begin) { revIt--; @@ -465,11 +465,11 @@ void TCompactTrieTest::CheckIterator(const char* data, size_t datalen) { revIt = begin; UNIT_ASSERT(revIt == trie.Begin()); UNIT_ASSERT(!revIt.IsEmpty()); - UNIT_ASSERT(revIt != emptyIt); + UNIT_ASSERT(revIt != emptyIt); UNIT_ASSERT(revIt != trie.End()); ++revIt; // Call a method that uses Skipper. - revIt = emptyIt; - UNIT_ASSERT(revIt == emptyIt); + revIt = emptyIt; + UNIT_ASSERT(revIt == emptyIt); UNIT_ASSERT(revIt.IsEmpty()); UNIT_ASSERT(revIt != trie.End()); // Checking the move assignment operator. |