mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Add resize_initialized and resize_uninitialized to Vector. These functions serve as replacements for resize, to make sure the caller understands whether elements need to be initialized 'by hand' after the call.
This commit is contained in:
parent
6c9765d87e
commit
4cb8a0c77e
24 changed files with 62 additions and 44 deletions
|
|
@ -3183,7 +3183,7 @@ RID RenderingDevice::vertex_array_create(uint32_t p_vertex_count, VertexFormatID
|
|||
VertexArray vertex_array;
|
||||
|
||||
if (p_offsets.is_empty()) {
|
||||
vertex_array.offsets.resize_zeroed(p_src_buffers.size());
|
||||
vertex_array.offsets.resize_initialized(p_src_buffers.size());
|
||||
} else {
|
||||
ERR_FAIL_COND_V(p_offsets.size() != p_src_buffers.size(), RID());
|
||||
vertex_array.offsets = p_offsets;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue