Remove flush_and_reserve_invalid_assuming_no_entities #16460
+2
−36
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.
Objective
flush_and_reserve_invalid_assuming_no_entities
was made for the old rendering world (which was reset every frame) and is usused since the 0.15 retained rendering world, but wasn't removed yet. It is pub, but is undocumented apart from the safety comment.Solution
Remove
flush_and_reserve_invalid_assuming_no_entities
and the safety invariants this method required forEntityMeta
,EntityLocation
,TableId
andTableRow
. This reduces the amount of unsafe code & safety invariants and makes #16047 easier.Alternatives
flush_and_reserve_invalid_assuming_no_entities
and keep it unchangedflush_and_reserve_invalid_assuming_no_entities
and change it to be based onEntityMeta::INVALID
Migration Guide
Entities::flush_and_reserve_invalid_assuming_no_entities
forreserve
andflush_as_invalid
and notify us if that's insufficient