diff options
author | Alexander Gololobov <[email protected]> | 2022-02-10 16:47:38 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:38 +0300 |
commit | fccc62e9bfdce9be2fe7e0f23479da3a5512211a (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/draft/holder_vector.h | |
parent | 39608cdb86363c75ce55b2b9a69841c3b71f22cf (diff) |
Restoring authorship annotation for Alexander Gololobov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/draft/holder_vector.h')
-rw-r--r-- | util/draft/holder_vector.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/draft/holder_vector.h b/util/draft/holder_vector.h index 0cf4689f6c6..1c62055bd95 100644 --- a/util/draft/holder_vector.h +++ b/util/draft/holder_vector.h @@ -20,8 +20,8 @@ public: void Clear() { for (typename TBase::iterator it = TBase::begin(); it != TBase::end(); ++it) { - if (*it) - D::Destroy(*it); + if (*it) + D::Destroy(*it); } TBase::clear(); } @@ -33,11 +33,11 @@ public: // TVector takes ownership of T void PushBack(T* t) { try { - TBase::push_back(t); + TBase::push_back(t); } catch (...) { - if (t) - D::Destroy(t); - throw; + if (t) + D::Destroy(t); + throw; } } @@ -65,11 +65,11 @@ public: } } - T* Release(size_t i) { - T* t = (*this)[i]; + T* Release(size_t i) { + T* t = (*this)[i]; (*this)[i] = nullptr; - return t; - } + return t; + } void Resize(size_t newSize) { for (size_t i = newSize; i < size(); ++i) { |