mirror of
https://github.com/bevyengine/bevy
synced 2025-01-08 19:29:04 +00:00
58f7dac689
# Objective `QueryState::is_empty` is unsound, as it does not validate the world. If a mismatched world is passed in, then the query filter may cast a component to an incorrect type, causing undefined behavior. ## Solution Add world validation. To prevent a performance regression in `Query` (whose world does not need to be validated), the unchecked function `is_empty_unsafe_world_cell` has been added. This also allows us to remove one of the last usages of the private function `UnsafeWorldCell::unsafe_world`, which takes us a step towards being able to remove that method entirely. |
||
---|---|---|
.. | ||
entity | ||
query | ||
reflect | ||
schedule | ||
storage | ||
system | ||
world | ||
archetype.rs | ||
bundle.rs | ||
change_detection.rs | ||
component.rs | ||
event.rs | ||
lib.rs | ||
removal_detection.rs |