[ox/std] Fix Vector move to not do small vector opt in consteval

This commit is contained in:
Gary Talent 2022-07-19 21:10:50 -05:00
parent 6ddeb29c92
commit 3a2995a67b

View File

@ -44,7 +44,7 @@ struct VectorAllocator {
constexpr void moveConstructItemsFrom(T **items, VectorAllocator &src, const std::size_t count, const std::size_t cap) noexcept {
// this totally idiotic redundant check (&& count <= Size) is required to address a bug in devkitARM,
// try removing it later
if (cap <= Size && count <= Size) {
if (!std::is_constant_evaluated() && cap <= Size && count <= Size) {
const auto dstItems = reinterpret_cast<T*>(m_data);
const auto srcItems = reinterpret_cast<T*>(src.m_data);
for (auto i = 0u; i < count; ++i) {
@ -57,7 +57,7 @@ struct VectorAllocator {
constexpr void moveItemsFrom(T **items, VectorAllocator &src, const std::size_t count, const std::size_t cap) noexcept {
// this totally idiotic redundant check (&& count <= Size) is required to address a bug in devkitARM,
// try removing it later
if (cap <= Size && count <= Size) {
if (!std::is_constant_evaluated() && cap <= Size && count <= Size) {
const auto dstItems = reinterpret_cast<T*>(m_data);
const auto srcItems = reinterpret_cast<T*>(src.m_data);
for (std::size_t i = 0; i < count; ++i) {