fix vector constructing

This commit is contained in:
altalk23 2024-01-13 16:56:08 +03:00
parent 784dd0fe42
commit badc7061ab

View file

@ -7,6 +7,7 @@
#include <unordered_set>
#include <set>
#include <vector>
#include <memory>
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());
}
}