diff options
author | agorodilov <agorodilov@yandex-team.ru> | 2022-02-10 16:47:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:09 +0300 |
commit | bd5ef432f5cfb1e18851381329d94665a4c22470 (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /library/cpp/containers/compact_vector | |
parent | 7a4979e6211c3e78c7f9041d4a9e5d3405343c36 (diff) | |
download | ydb-bd5ef432f5cfb1e18851381329d94665a4c22470.tar.gz |
Restoring authorship annotation for <agorodilov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/compact_vector')
-rw-r--r-- | library/cpp/containers/compact_vector/compact_vector.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/containers/compact_vector/compact_vector.h b/library/cpp/containers/compact_vector/compact_vector.h index 95f1255815..dbe7473f0c 100644 --- a/library/cpp/containers/compact_vector/compact_vector.h +++ b/library/cpp/containers/compact_vector/compact_vector.h @@ -39,12 +39,12 @@ public: typedef TConstIterator const_iterator; TCompactVector() - : Ptr(nullptr) + : Ptr(nullptr) { } TCompactVector(const TThis& that) - : Ptr(nullptr) + : Ptr(nullptr) { Reserve(that.Size()); for (TConstIterator i = that.Begin(); i != that.End(); ++i) { @@ -101,9 +101,9 @@ public: void Reserve(size_t newCapacity) { if (newCapacity <= Capacity()) { - } else if (Ptr == nullptr) { + } else if (Ptr == nullptr) { void* mem = ::malloc(sizeof(THeader) + newCapacity * sizeof(T)); - if (mem == nullptr) + if (mem == nullptr) ythrow yexception() << "out of memory"; Ptr = (T*)(((THeader*)mem) + 1); Header()->Size = 0; |