diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | bf9e69a933f89af083d895185f01ed65e4d90766 (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /library/cpp/containers | |
parent | 863a59a65247c24db7cb06789bc5cf79d04da32f (diff) | |
download | ydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers')
6 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/containers/comptrie/chunked_helpers_trie.h b/library/cpp/containers/comptrie/chunked_helpers_trie.h index 79822b83d3..cfa35f5ba2 100644 --- a/library/cpp/containers/comptrie/chunked_helpers_trie.h +++ b/library/cpp/containers/comptrie/chunked_helpers_trie.h @@ -192,7 +192,7 @@ public: } void Save(IOutputStream& out) { - Sort(Values.begin(), Values.end()); + Sort(Values.begin(), Values.end()); TTrieMapWriter<T, true> writer; for (typename TValues::const_iterator toValue = Values.begin(); toValue != Values.end(); ++toValue) writer.Add(toValue->first.data(), toValue->second); diff --git a/library/cpp/containers/comptrie/comptrie_builder.inl b/library/cpp/containers/comptrie/comptrie_builder.inl index bbf51bd26c..f273fa6571 100644 --- a/library/cpp/containers/comptrie/comptrie_builder.inl +++ b/library/cpp/containers/comptrie/comptrie_builder.inl @@ -17,7 +17,7 @@ #include <util/generic/strbuf.h> #include <util/system/align.h> -#include <util/stream/buffer.h> +#include <util/stream/buffer.h> #define CONSTEXPR_MAX2(a, b) (a) > (b) ? (a) : (b) #define CONSTEXPR_MAX3(a, b, c) CONSTEXPR_MAX2(CONSTEXPR_MAX2(a, b), c) diff --git a/library/cpp/containers/comptrie/key_selector.h b/library/cpp/containers/comptrie/key_selector.h index 910af8ec22..60466cef71 100644 --- a/library/cpp/containers/comptrie/key_selector.h +++ b/library/cpp/containers/comptrie/key_selector.h @@ -13,7 +13,7 @@ struct TCompactTrieKeySelector { template <class TChar> struct TCompactTrieCharKeySelector { typedef TBasicString<TChar> TKey; - typedef TBasicStringBuf<TChar> TKeyBuf; + typedef TBasicStringBuf<TChar> TKeyBuf; }; template <> diff --git a/library/cpp/containers/sorted_vector/sorted_vector.h b/library/cpp/containers/sorted_vector/sorted_vector.h index 53e0786a8e..123539af9e 100644 --- a/library/cpp/containers/sorted_vector/sorted_vector.h +++ b/library/cpp/containers/sorted_vector/sorted_vector.h @@ -49,7 +49,7 @@ 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 TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>> class TSortedVector: public TVector<TValueType, A> { private: typedef TVector<TValueType, A> TBase; @@ -327,7 +327,7 @@ namespace NSorted { // This structure has the side-effect: if you keep a reference to an existing element // and then inserts a new one, the existing reference can be broken (due to reallocation). // Please keep this in mind when using this structure. - template <typename TKeyType, typename TValueType, class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>> + template <typename TKeyType, typename TValueType, class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>> class TSimpleMap: public TSortedVector<std::pair<TKeyType, TValueType>, TKeyType, TSelect1st, TPredicate, A>, public TMapOps<TSimpleMap<TKeyType, TValueType, TPredicate, A>> @@ -401,7 +401,7 @@ namespace NSorted { // This structure has the same side-effect as TSimpleMap. // The value type must have TValueType(TKeyType) constructor in order to use [] operator template <typename TValueType, typename TKeyType = TValueType, class TKeyExtractor = TIdentity, - class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>> + class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>> class TSimpleSet: public TSortedVector<TValueType, TKeyType, TKeyExtractor, TPredicate, A> { private: typedef TSortedVector<TValueType, TKeyType, TKeyExtractor, TPredicate, A> TBase; diff --git a/library/cpp/containers/stack_array/stack_array.h b/library/cpp/containers/stack_array/stack_array.h index d5c8bab8d0..28e49bfc3c 100644 --- a/library/cpp/containers/stack_array/stack_array.h +++ b/library/cpp/containers/stack_array/stack_array.h @@ -6,21 +6,21 @@ #include <util/system/defaults.h> /* For alloca. */ namespace NStackArray { - /** + /** * A stack-allocated array. Should be used instead of � variable length - * arrays that are not part of C++ standard. - * - * Example usage: - * @code - * void f(int size) { - * // T array[size]; // Wrong! - * TStackArray<T> array(ALLOC_ON_STACK(T, size)); // Right! - * // ... - * } - * @endcode - * - * Note that it is generally a *VERY BAD* idea to use this in inline methods - * as those might be called from a loop, and then stack overflow is in the cards. + * arrays that are not part of C++ standard. + * + * Example usage: + * @code + * void f(int size) { + * // T array[size]; // Wrong! + * TStackArray<T> array(ALLOC_ON_STACK(T, size)); // Right! + * // ... + * } + * @endcode + * + * Note that it is generally a *VERY BAD* idea to use this in inline methods + * as those might be called from a loop, and then stack overflow is in the cards. */ template <class T> class TStackArray: public TArrayRef<T> { diff --git a/library/cpp/containers/stack_vector/stack_vec.h b/library/cpp/containers/stack_vector/stack_vec.h index 04c9764374..fcc5d9a2a5 100644 --- a/library/cpp/containers/stack_vector/stack_vec.h +++ b/library/cpp/containers/stack_vector/stack_vec.h @@ -14,7 +14,7 @@ template <typename T, size_t CountOnStack = 256, bool UseFallbackAlloc = true, class Alloc = std::allocator<T>> class TStackVec; -template <typename T, class Alloc = std::allocator<T>> +template <typename T, class Alloc = std::allocator<T>> using TSmallVec = TStackVec<T, 16, true, Alloc>; template <typename T, size_t CountOnStack = 256> @@ -23,7 +23,7 @@ using TStackOnlyVec = TStackVec<T, CountOnStack, false>; namespace NPrivate { template <class Alloc, class StackAlloc, typename T, typename U> struct TRebind { - typedef TReboundAllocator<Alloc, U> other; + typedef TReboundAllocator<Alloc, U> other; }; template <class Alloc, class StackAlloc, typename T> |