Un-support force_trivial
parameter for LocalVector
. Instead, users should use resize_uninitialized
.
#106876
+20
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resize_initialized
andresize_uninitialized
toVector
andLocalVector
#104522The parameter
force_trivial
was always just a way to resize theLocalVector
without calling default initializers (to save time).Now, this is no longer required - users can simply call
resize_uninitialized
! This makes it explicit where a resize is happening without filling values.This PR should not change behavior, just simplify matters and improve code style.
Notes
changed_items
and_cull_hits
, they never calledresize
so theforce_trivial
parameter was useless for both.force_trivial
behavior handling is bubbled up toPooledList
. It is somewhat questionable whether it is appropriate here, because it is only used to create one object at a time. Still, this is outside the scope of this PR to change._active_map
andfreelist
use a trivial type so they don't initialize onresize
(regardless offorce_trivial
). I took the opportunity to make this explicit usingresize_uninitialized
, as we'll make that a goal soon anyway.