diff options
author | gritukan <gritukan@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
commit | 5ab2c1182d0b02a3880e1869c6351b7ba802a19b (patch) | |
tree | f1d99c4a9a7e3f3c2ed90004db7cd7dc8502c2ce /library/cpp/yt/memory | |
parent | 2a4a975b112fa0fa138abc7457fe67e0e1e7fd02 (diff) | |
download | ydb-5ab2c1182d0b02a3880e1869c6351b7ba802a19b.tar.gz |
Restoring authorship annotation for <gritukan@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt/memory')
-rw-r--r-- | library/cpp/yt/memory/blob.h | 12 | ||||
-rw-r--r-- | library/cpp/yt/memory/range.h | 54 | ||||
-rw-r--r-- | library/cpp/yt/memory/ref-inl.h | 10 | ||||
-rw-r--r-- | library/cpp/yt/memory/ref.h | 2 | ||||
-rw-r--r-- | library/cpp/yt/memory/shared_range.h | 48 |
5 files changed, 63 insertions, 63 deletions
diff --git a/library/cpp/yt/memory/blob.h b/library/cpp/yt/memory/blob.h index 99441fb8c9..2b275ed261 100644 --- a/library/cpp/yt/memory/blob.h +++ b/library/cpp/yt/memory/blob.h @@ -119,12 +119,12 @@ public: } //! Returns the size. - Y_FORCE_INLINE size_t size() const - { - return Size_; - } - - //! Returns the size. + Y_FORCE_INLINE size_t size() const + { + return Size_; + } + + //! Returns the size. Y_FORCE_INLINE size_t Size() const { return Size_; diff --git a/library/cpp/yt/memory/range.h b/library/cpp/yt/memory/range.h index 6c71aa9496..6fe43d4cf3 100644 --- a/library/cpp/yt/memory/range.h +++ b/library/cpp/yt/memory/range.h @@ -77,13 +77,13 @@ public: , Length_(end - begin) { } - //! Constructs a TRange from a TCompactVector. - template <size_t N> - TRange(const TCompactVector<T, N>& elements) - : Data_(elements.data()) - , Length_(elements.size()) - { } - + //! Constructs a TRange from a TCompactVector. + template <size_t N> + TRange(const TCompactVector<T, N>& elements) + : Data_(elements.data()) + , Length_(elements.size()) + { } + //! Constructs a TRange from an std::vector. template <class A> TRange(const std::vector<T, A>& elements) @@ -234,13 +234,13 @@ TRange<T> MakeRange(const T* begin, const T* end) return TRange<T>(begin, end); } -//! Constructs a TRange from a TCompactVector. -template <class T, size_t N> -TRange<T> MakeRange(const TCompactVector<T, N>& elements) -{ - return elements; -} - +//! Constructs a TRange from a TCompactVector. +template <class T, size_t N> +TRange<T> MakeRange(const TCompactVector<T, N>& elements) +{ + return elements; +} + //! "Copy-constructor". template <class T> TRange<T> MakeRange(TRange<T> range) @@ -327,12 +327,12 @@ public: : TRange<T>(begin, end) { } - //! Constructs a TMutableRange from a TCompactVector. - template <size_t N> - TMutableRange(TCompactVector<T, N>& elements) - : TRange<T>(elements) - { } - + //! Constructs a TMutableRange from a TCompactVector. + template <size_t N> + TMutableRange(TCompactVector<T, N>& elements) + : TRange<T>(elements) + { } + //! Constructs a TMutableRange from an std::vector. TMutableRange(std::vector<T>& elements) : TRange<T>(elements) @@ -445,13 +445,13 @@ TMutableRange<T> MakeMutableRange(T* begin, T* end) return TMutableRange<T>(begin, end); } -//! Constructs a TMutableRange from a TCompactVector. -template <class T, size_t N> -TMutableRange<T> MakeMutableRange(TCompactVector<T, N>& elements) -{ - return elements; -} - +//! Constructs a TMutableRange from a TCompactVector. +template <class T, size_t N> +TMutableRange<T> MakeMutableRange(TCompactVector<T, N>& elements) +{ + return elements; +} + //! "Copy-constructor". template <class T> TMutableRange<T> MakeMutableRange(TMutableRange<T> range) diff --git a/library/cpp/yt/memory/ref-inl.h b/library/cpp/yt/memory/ref-inl.h index 79be8356c5..70fc8ae29d 100644 --- a/library/cpp/yt/memory/ref-inl.h +++ b/library/cpp/yt/memory/ref-inl.h @@ -461,11 +461,11 @@ Y_FORCE_INLINE size_t TSharedRefArray::Size() const return Impl_ ? Impl_->Size() : 0; } -Y_FORCE_INLINE size_t TSharedRefArray::size() const -{ - return Impl_ ? Impl_->Size() : 0; -} - +Y_FORCE_INLINE size_t TSharedRefArray::size() const +{ + return Impl_ ? Impl_->Size() : 0; +} + Y_FORCE_INLINE bool TSharedRefArray::Empty() const { return Impl_ ? Impl_->Empty() : true; diff --git a/library/cpp/yt/memory/ref.h b/library/cpp/yt/memory/ref.h index 73d19d9013..7d51df3bea 100644 --- a/library/cpp/yt/memory/ref.h +++ b/library/cpp/yt/memory/ref.h @@ -278,7 +278,7 @@ public: void Reset(); size_t Size() const; - size_t size() const; + size_t size() const; i64 ByteSize() const; bool Empty() const; const TSharedRef& operator [] (size_t index) const; diff --git a/library/cpp/yt/memory/shared_range.h b/library/cpp/yt/memory/shared_range.h index 9841d7a0df..46c8936bed 100644 --- a/library/cpp/yt/memory/shared_range.h +++ b/library/cpp/yt/memory/shared_range.h @@ -10,9 +10,9 @@ namespace NYT { //////////////////////////////////////////////////////////////////////////////// -template <class T, size_t N> -class TCompactVector; - +template <class T, size_t N> +class TCompactVector; + //! TRange with ownership semantics. template <class T> class TSharedRange @@ -43,13 +43,13 @@ public: , Holder_(std::move(holder)) { } - //! Constructs a TSharedRange from a TCompactVector. - template <size_t N> - TSharedRange(const TCompactVector<T, N>& elements, THolderPtr holder) - : TRange<T>(elements) - , Holder_(std::move(holder)) - { } - + //! Constructs a TSharedRange from a TCompactVector. + template <size_t N> + TSharedRange(const TCompactVector<T, N>& elements, THolderPtr holder) + : TRange<T>(elements) + , Holder_(std::move(holder)) + { } + //! Constructs a TSharedRange from an std::vector. TSharedRange(const std::vector<T>& elements, THolderPtr holder) : TRange<T>(elements) @@ -143,13 +143,13 @@ TSharedRange<T> MakeSharedRange(std::vector<T>&& elements, THolders&&... holders return DoMakeSharedRange<T>(std::move(elements), std::forward<THolders>(holders)...); } -//! Constructs a TSharedRange by taking ownership of an TCompactVector. -template <class T, size_t N, class... THolders> -TSharedRange<T> MakeSharedRange(TCompactVector<T, N>&& elements, THolders&&... holders) -{ - return DoMakeSharedRange<T>(std::move(elements), std::forward<THolders>(holders)...); -} - +//! Constructs a TSharedRange by taking ownership of an TCompactVector. +template <class T, size_t N, class... THolders> +TSharedRange<T> MakeSharedRange(TCompactVector<T, N>&& elements, THolders&&... holders) +{ + return DoMakeSharedRange<T>(std::move(elements), std::forward<THolders>(holders)...); +} + //! Constructs a TSharedRange by copying an std::vector. template <class T, class... THolders> TSharedRange<T> MakeSharedRange(const std::vector<T>& elements, THolders&&... holders) @@ -209,13 +209,13 @@ public: , Holder_(std::move(holder)) { } - //! Constructs a TSharedMutableRange from a TCompactVector. - template <size_t N> - TSharedMutableRange(TCompactVector<T, N>& elements, THolderPtr holder) - : TMutableRange<T>(elements) - , Holder_(std::move(holder)) - { } - + //! Constructs a TSharedMutableRange from a TCompactVector. + template <size_t N> + TSharedMutableRange(TCompactVector<T, N>& elements, THolderPtr holder) + : TMutableRange<T>(elements) + , Holder_(std::move(holder)) + { } + //! Constructs a TSharedMutableRange from an std::vector. TSharedMutableRange(std::vector<T>& elements, THolderPtr holder) : TMutableRange<T>(elements) |