Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/templates/local_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ class LocalVector {
/// Resize and set all values to 0 / false / nullptr.
_FORCE_INLINE_ void resize_initialized(U p_size) { _resize<true>(p_size); }

/// Resize and set all values to 0 / false / nullptr.
/// Resize and keep memory uninitialized.
Comment thread
HolonProduction marked this conversation as resolved.
/// This means that any newly added elements have an unknown value, and are expected to be set after the `resize_uninitialized` call.
/// This is only available for trivially destructible types (otherwise, trivial resize might be UB).
_FORCE_INLINE_ void resize_uninitialized(U p_size) { _resize<false>(p_size); }

Expand Down
3 changes: 2 additions & 1 deletion core/templates/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ class Vector {
return _cowdata.template resize<true>(p_size);
}

/// Resize and set all values to 0 / false / nullptr.
/// Resize and keep memory uninitialized.
/// This means that any newly added elements have an unknown value, and are expected to be set after the `resize_uninitialized` call.
/// This is only available for trivially destructible types (otherwise, trivial resize might be UB).
_FORCE_INLINE_ Error resize_uninitialized(Size p_size) {
// resize() statically asserts that T is compatible, no need to do it ourselves.
Expand Down