From 01d0878c83028c931295f08b062dc5308050b8cc Mon Sep 17 00:00:00 2001 From: HolonProduction Date: Wed, 7 Jan 2026 17:24:28 +0100 Subject: [PATCH] Fix description for `resize_uninitialized` --- core/templates/local_vector.h | 3 ++- core/templates/vector.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h index 80d67676dc..1feaa3f673 100644 --- a/core/templates/local_vector.h +++ b/core/templates/local_vector.h @@ -193,7 +193,8 @@ public: /// Resize and set all values to 0 / false / nullptr. _FORCE_INLINE_ void resize_initialized(U p_size) { _resize(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_ void resize_uninitialized(U p_size) { _resize(p_size); } diff --git a/core/templates/vector.h b/core/templates/vector.h index 562fdc8107..9d12aea070 100644 --- a/core/templates/vector.h +++ b/core/templates/vector.h @@ -114,7 +114,8 @@ public: return _cowdata.template resize(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.