diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/containers/sorted_vector | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
download | ydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/sorted_vector')
-rw-r--r-- | library/cpp/containers/sorted_vector/sorted_vector.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/containers/sorted_vector/sorted_vector.h b/library/cpp/containers/sorted_vector/sorted_vector.h index d9a242ab59..123539af9e 100644 --- a/library/cpp/containers/sorted_vector/sorted_vector.h +++ b/library/cpp/containers/sorted_vector/sorted_vector.h @@ -50,9 +50,9 @@ namespace NSorted { // Sorted vector, which is order by the key. The key is extracted from the value by the provided key-extractor template <typename TValueType, typename TKeyType = TValueType, class TKeyExtractor = TIdentity, class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>> - class TSortedVector: public TVector<TValueType, A> { + class TSortedVector: public TVector<TValueType, A> { private: - typedef TVector<TValueType, A> TBase; + typedef TVector<TValueType, A> TBase; typedef NPrivate::TKeyCompare<TValueType, TPredicate, TKeyExtractor> TKeyCompare; typedef NPrivate::TEqual<TKeyCompare> TValueEqual; typedef NPrivate::TEqual<TPredicate> TKeyEqual; @@ -364,7 +364,7 @@ namespace NSorted { inline TValueType& Get(const TKeyType& key) { typename TBase::iterator i = TBase::LowerBound(key); if (i == TBase::end() || key != i->first) - return TVector<std::pair<TKeyType, TValueType>, A>::insert(i, std::make_pair(key, TValueType()))->second; + return TVector<std::pair<TKeyType, TValueType>, A>::insert(i, std::make_pair(key, TValueType()))->second; else return i->second; } @@ -437,7 +437,7 @@ namespace NSorted { inline TValueType& Get(const TKeyType& key) { typename TBase::iterator i = TBase::LowerBound(key); if (i == TBase::end() || !TKeyEqual()(TKeyExtractor()(*i), key)) - i = TVector<TValueType, A>::insert(i, TValueType(key)); + i = TVector<TValueType, A>::insert(i, TValueType(key)); return *i; } |