Simplify Memory::memnew_arr_placement to always initialize memory, to force callers to make the decision of whether to initialize.
This commit is contained in:
@ -107,7 +107,7 @@ public:
|
||||
constexpr Error resize_initialized(uint32_t p_size) {
|
||||
if (p_size > _size) {
|
||||
ERR_FAIL_COND_V(p_size > CAPACITY, ERR_OUT_OF_MEMORY);
|
||||
memnew_arr_placement<true>(ptr() + _size, p_size - _size);
|
||||
memnew_arr_placement(ptr() + _size, p_size - _size);
|
||||
} else if (p_size < _size) {
|
||||
if constexpr (!std::is_trivially_destructible_v<T>) {
|
||||
for (uint32_t i = p_size; i < _size; i++) {
|
||||
|
||||
Reference in New Issue
Block a user