aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorAlexey Bykov <alexei4203@yandex.ru>2022-02-10 16:47:16 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:16 +0300
commitb50730a77e0c38f2fec0ad5d53fb2034d6470221 (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /util
parent4cadece7a57ab767e762a0bea1995a596aefeb11 (diff)
downloadydb-b50730a77e0c38f2fec0ad5d53fb2034d6470221.tar.gz
Restoring authorship annotation for Alexey Bykov <alexei4203@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/generic/array_ref.h4
-rw-r--r--util/generic/ptr.h12
-rw-r--r--util/memory/blob.h28
-rw-r--r--util/memory/blob_ut.cpp2
4 files changed, 23 insertions, 23 deletions
diff --git a/util/generic/array_ref.h b/util/generic/array_ref.h
index e4a4975ba9..1ac60ac7d3 100644
--- a/util/generic/array_ref.h
+++ b/util/generic/array_ref.h
@@ -16,7 +16,7 @@
*
* Note that `TArrayRef` can be auto-constructed from any contiguous container
* (with `size` and `data` members), and thus you don't have to change client code
- * when switching over from passing `TVector` to `TArrayRef`.
+ * when switching over from passing `TVector` to `TArrayRef`.
*
* Note that `TArrayRef` has the same const-semantics as raw pointers:
* - `TArrayRef<T>` is a non-const reference to non-const data (like `T*`);
@@ -157,7 +157,7 @@ public:
/**
* Obtains a ref that is a view over the first `count` elements of this TArrayRef.
*
- * The behavior is undefined if count > size().
+ * The behavior is undefined if count > size().
*/
TArrayRef first(size_t count) const {
Y_ASSERT(count <= size());
diff --git a/util/generic/ptr.h b/util/generic/ptr.h
index 8c9e19e09e..19db0e3ec5 100644
--- a/util/generic/ptr.h
+++ b/util/generic/ptr.h
@@ -345,7 +345,7 @@ private:
};
template <typename T, typename... Args>
-[[nodiscard]] THolder<T> MakeHolder(Args&&... args) {
+[[nodiscard]] THolder<T> MakeHolder(Args&&... args) {
return THolder<T>(new T(std::forward<Args>(args)...));
}
@@ -779,12 +779,12 @@ template <class T, class Ops>
typename TSimpleIntrusiveOps<T, Ops>::TFunc TSimpleIntrusiveOps<T, Ops>::UnRef_ = nullptr;
template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args>
-[[nodiscard]] TIntrusivePtr<T, Ops> MakeIntrusive(Args&&... args) {
+[[nodiscard]] TIntrusivePtr<T, Ops> MakeIntrusive(Args&&... args) {
return new T{std::forward<Args>(args)...};
}
template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args>
-[[nodiscard]] TIntrusiveConstPtr<T, Ops> MakeIntrusiveConst(Args&&... args) {
+[[nodiscard]] TIntrusiveConstPtr<T, Ops> MakeIntrusiveConst(Args&&... args) {
return new T{std::forward<Args>(args)...};
}
@@ -948,17 +948,17 @@ template <class T, class D = TDelete>
using TSimpleSharedPtr = TSharedPtr<T, TSimpleCounter, D>;
template <typename T, typename C, typename... Args>
-[[nodiscard]] TSharedPtr<T, C> MakeShared(Args&&... args) {
+[[nodiscard]] TSharedPtr<T, C> MakeShared(Args&&... args) {
return new T{std::forward<Args>(args)...};
}
template <typename T, typename... Args>
-[[nodiscard]] inline TAtomicSharedPtr<T> MakeAtomicShared(Args&&... args) {
+[[nodiscard]] inline TAtomicSharedPtr<T> MakeAtomicShared(Args&&... args) {
return MakeShared<T, TAtomicCounter>(std::forward<Args>(args)...);
}
template <typename T, typename... Args>
-[[nodiscard]] inline TSimpleSharedPtr<T> MakeSimpleShared(Args&&... args) {
+[[nodiscard]] inline TSimpleSharedPtr<T> MakeSimpleShared(Args&&... args) {
return MakeShared<T, TSimpleCounter>(std::forward<Args>(args)...);
}
diff --git a/util/memory/blob.h b/util/memory/blob.h
index 3f311b9ec2..20c02a68df 100644
--- a/util/memory/blob.h
+++ b/util/memory/blob.h
@@ -55,7 +55,7 @@ private:
};
public:
- using value_type = ui8;
+ using value_type = ui8;
using const_reference = const value_type&;
using const_pointer = const value_type*;
using const_iterator = const_pointer;
@@ -149,20 +149,20 @@ public:
* Some stl-like methods
*/
- /// Returns a const reference to the data array.
- /// result type is const ui8* which is not consistent with Data method above
- /// but it's consistent with operator[], Begin and End methods below
- /// Also it allows us to construct TArrayRef from TBlob
- inline const_pointer data() const noexcept {
- return static_cast<const_pointer>(Data());
- }
-
+ /// Returns a const reference to the data array.
+ /// result type is const ui8* which is not consistent with Data method above
+ /// but it's consistent with operator[], Begin and End methods below
+ /// Also it allows us to construct TArrayRef from TBlob
+ inline const_pointer data() const noexcept {
+ return static_cast<const_pointer>(Data());
+ }
+
+ /// Returns the size of the data array in bytes.
+ inline size_t size() const noexcept {
+ return Length();
+ }
+
/// Returns the size of the data array in bytes.
- inline size_t size() const noexcept {
- return Length();
- }
-
- /// Returns the size of the data array in bytes.
inline size_t Size() const noexcept {
return Length();
}
diff --git a/util/memory/blob_ut.cpp b/util/memory/blob_ut.cpp
index e8ad129664..023f9a0487 100644
--- a/util/memory/blob_ut.cpp
+++ b/util/memory/blob_ut.cpp
@@ -7,7 +7,7 @@
#include <util/stream/output.h>
#include <util/stream/file.h>
#include <util/generic/buffer.h>
-#include <util/generic/array_ref.h>
+#include <util/generic/array_ref.h>
Y_UNIT_TEST_SUITE(TBlobTest) {
Y_UNIT_TEST(TestSubBlob) {