diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/containers/compact_vector/compact_vector.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/compact_vector/compact_vector.h')
-rw-r--r-- | library/cpp/containers/compact_vector/compact_vector.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/containers/compact_vector/compact_vector.h b/library/cpp/containers/compact_vector/compact_vector.h index 9e37938546..dbe7473f0c 100644 --- a/library/cpp/containers/compact_vector/compact_vector.h +++ b/library/cpp/containers/compact_vector/compact_vector.h @@ -24,11 +24,11 @@ private: T* Ptr; THeader* Header() { - return ((THeader*)Ptr) - 1; + return ((THeader*)Ptr) - 1; } const THeader* Header() const { - return ((THeader*)Ptr) - 1; + return ((THeader*)Ptr) - 1; } public: @@ -40,8 +40,8 @@ public: TCompactVector() : Ptr(nullptr) - { - } + { + } TCompactVector(const TThis& that) : Ptr(nullptr) @@ -105,7 +105,7 @@ public: void* mem = ::malloc(sizeof(THeader) + newCapacity * sizeof(T)); if (mem == nullptr) ythrow yexception() << "out of memory"; - Ptr = (T*)(((THeader*)mem) + 1); + Ptr = (T*)(((THeader*)mem) + 1); Header()->Size = 0; Header()->Capacity = newCapacity; } else { @@ -197,12 +197,12 @@ public: Clear(); } - T& operator[](size_t index) { + T& operator[](size_t index) { Y_ASSERT(index < Size()); return Ptr[index]; } - const T& operator[](size_t index) const { + const T& operator[](size_t index) const { Y_ASSERT(index < Size()); return Ptr[index]; } |