aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/kstd/include/kstd/vector6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/kstd/include/kstd/vector b/libs/kstd/include/kstd/vector
index 0a3d6b7..e4979e5 100644
--- a/libs/kstd/include/kstd/vector
+++ b/libs/kstd/include/kstd/vector
@@ -562,10 +562,8 @@ namespace kstd
//! Clear the contents of this vector.
constexpr auto clear() noexcept -> void
{
- for (auto i = m_size; i > 0; --i)
- {
- pop_back();
- }
+ destroy_n(begin(), size());
+ m_size = 0;
}
//! Append a given element to this vector via copy construction.