From 070b3cb6c6e9a3157b1437a4eecf8e69461e5606 Mon Sep 17 00:00:00 2001 From: ZCWang <1627343141@qq.com> Date: Wed, 30 Oct 2024 10:14:08 +0800 Subject: [PATCH] prev has wrong push --- shared_module/container/detail/small_vector_base.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared_module/container/detail/small_vector_base.hpp b/shared_module/container/detail/small_vector_base.hpp index c90a172..acafc9d 100644 --- a/shared_module/container/detail/small_vector_base.hpp +++ b/shared_module/container/detail/small_vector_base.hpp @@ -245,7 +245,7 @@ public: { if (count <= N) { if (size() > N) { - m_stack.assign(std::make_move_iterator(m_heap->begin()), std::make_move_iterator(m_heap->end())); + m_stack.assign(std::make_move_iterator(m_heap->begin()), std::make_move_iterator(m_heap->begin() + count)); m_heap->clear(); m_first = m_stack.begin(); } else { @@ -263,7 +263,7 @@ public: { if (count <= N) { if (size() > N) { - m_stack.assign(std::make_move_iterator(m_heap->begin()), std::make_move_iterator(m_heap->end())); + m_stack.assign(std::make_move_iterator(m_heap->begin()), std::make_move_iterator(m_heap->begin() + count)); m_heap->clear(); m_first = m_stack.begin(); } else {