You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user