mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
fix vector constructing
This commit is contained in:
parent
784dd0fe42
commit
badc7061ab
1 changed files with 4 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace geode::base {
|
namespace geode::base {
|
||||||
uintptr_t get();
|
uintptr_t get();
|
||||||
|
@ -285,8 +286,7 @@ namespace gd {
|
||||||
m_start = this->allocator().allocate(input.size());
|
m_start = this->allocator().allocate(input.size());
|
||||||
m_finish = m_start + input.size();
|
m_finish = m_start + input.size();
|
||||||
m_reserveEnd = m_start + input.size();
|
m_reserveEnd = m_start + input.size();
|
||||||
|
std::construct_at(m_start, input.begin(), input.end());
|
||||||
std::copy(input.begin(), input.end(), m_start);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,8 +295,7 @@ namespace gd {
|
||||||
m_start = this->allocator().allocate(input.size());
|
m_start = this->allocator().allocate(input.size());
|
||||||
m_finish = m_start + input.size();
|
m_finish = m_start + input.size();
|
||||||
m_reserveEnd = m_start + input.size();
|
m_reserveEnd = m_start + input.size();
|
||||||
|
std::construct_at(m_start, input.begin(), input.end());
|
||||||
std::copy(input.begin(), input.end(), m_start);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +341,7 @@ namespace gd {
|
||||||
m_finish = m_start + input.size();
|
m_finish = m_start + input.size();
|
||||||
m_reserveEnd = 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue