From badc7061abfe09d5a52a0d3e3d22f055265c5d28 Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Sat, 13 Jan 2024 16:56:08 +0300 Subject: [PATCH] fix vector constructing --- loader/include/Geode/c++stl/gnustl.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/loader/include/Geode/c++stl/gnustl.hpp b/loader/include/Geode/c++stl/gnustl.hpp index e4aa7011..4e2d9aa8 100644 --- a/loader/include/Geode/c++stl/gnustl.hpp +++ b/loader/include/Geode/c++stl/gnustl.hpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace geode::base { uintptr_t get(); @@ -285,8 +286,7 @@ namespace gd { m_start = this->allocator().allocate(input.size()); m_finish = m_start + input.size(); m_reserveEnd = m_start + input.size(); - - std::copy(input.begin(), input.end(), m_start); + std::construct_at(m_start, input.begin(), input.end()); } } @@ -295,8 +295,7 @@ namespace gd { m_start = this->allocator().allocate(input.size()); m_finish = m_start + input.size(); m_reserveEnd = m_start + input.size(); - - std::copy(input.begin(), input.end(), m_start); + std::construct_at(m_start, input.begin(), input.end()); } } @@ -342,7 +341,7 @@ namespace gd { m_finish = m_start + input.size(); m_reserveEnd = m_start + input.size(); - std::copy(input.begin(), input.end(), m_start); + std::construct_at(m_start, input.begin(), input.end()); } }