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
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/asset_changed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ unsafe impl<A: AsAssetId> WorldQuery for AssetChanged<A> {
}

#[inline]
fn update_component_access(state: &Self::State, access: &mut FilteredAccess<ComponentId>) {
fn update_component_access(state: &Self::State, access: &mut FilteredAccess) {
<&A>::update_component_access(&state.asset_id, access);
access.add_resource_read(state.resource_id);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream {
}
}

fn init_access(state: &Self::State, system_meta: &mut #path::system::SystemMeta, component_access_set: &mut #path::query::FilteredAccessSet<#path::component::ComponentId>, world: &mut #path::world::World) {
fn init_access(state: &Self::State, system_meta: &mut #path::system::SystemMeta, component_access_set: &mut #path::query::FilteredAccessSet, world: &mut #path::world::World) {
<#fields_alias::<'_, '_, #punctuated_generic_idents> as #path::system::SystemParam>::init_access(&state.state, system_meta, component_access_set, world);
}

Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_ecs/macros/src/query_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ pub fn derive_query_data_impl(input: TokenStream) -> TokenStream {

fn provide_extra_access(
state: &mut Self::State,
access: &mut #path::query::Access<#path::component::ComponentId>,
available_access: &#path::query::Access<#path::component::ComponentId>,
access: &mut #path::query::Access,
available_access: &#path::query::Access,
) {
#(<#field_types>::provide_extra_access(&mut state.#named_field_idents, access, available_access);)*
}
Expand Down Expand Up @@ -339,8 +339,8 @@ pub fn derive_query_data_impl(input: TokenStream) -> TokenStream {

fn provide_extra_access(
state: &mut Self::State,
access: &mut #path::query::Access<#path::component::ComponentId>,
available_access: &#path::query::Access<#path::component::ComponentId>,
access: &mut #path::query::Access,
available_access: &#path::query::Access,
) {
#(<#field_types>::provide_extra_access(&mut state.#named_field_idents, access, available_access);)*
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/macros/src/world_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub(crate) fn world_query_impl(
#(<#field_types>::set_table(&mut _fetch.#named_field_idents, &_state.#named_field_idents, _table);)*
}

fn update_component_access(state: &Self::State, _access: &mut #path::query::FilteredAccess<#path::component::ComponentId>) {
fn update_component_access(state: &Self::State, _access: &mut #path::query::FilteredAccess) {
#( <#field_types>::update_component_access(&state.#named_field_idents, _access); )*
}

Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/entity_disabling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl DefaultQueryFilters {
}

/// Modifies the provided [`FilteredAccess`] to include the filters from this [`DefaultQueryFilters`].
pub(super) fn modify_access(&self, component_access: &mut FilteredAccess<ComponentId>) {
pub(super) fn modify_access(&self, component_access: &mut FilteredAccess) {
for component_id in self.disabling_ids() {
if !component_access.contains(component_id) {
component_access.and_without(component_id);
Expand Down Expand Up @@ -276,7 +276,7 @@ mod tests {
filters.register_disabling_component(ComponentId::new(1));

// A component access with an unrelated component
let mut component_access = FilteredAccess::<ComponentId>::default();
let mut component_access = FilteredAccess::default();
component_access
.access_mut()
.add_component_read(ComponentId::new(2));
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ mod tests {
use crate::{
bundle::Bundle,
change_detection::Ref,
component::{Component, ComponentId},
component::Component,
entity::{Entity, EntityMapper},
entity_disabling::DefaultQueryFilters,
prelude::Or,
Expand Down Expand Up @@ -1536,7 +1536,7 @@ mod tests {
world.remove_resource::<DefaultQueryFilters>();
let query = world.query_filtered::<&mut A, Changed<B>>();

let mut expected = FilteredAccess::<ComponentId>::default();
let mut expected = FilteredAccess::default();
let a_id = world.components.get_id(TypeId::of::<A>()).unwrap();
let b_id = world.components.get_id(TypeId::of::<B>()).unwrap();
expected.add_component_write(a_id);
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ unsafe impl<'a> SystemParam for &'a RemovedComponentEvents {
fn init_access(
_state: &Self::State,
_system_meta: &mut SystemMeta,
_component_access_set: &mut FilteredAccessSet<ComponentId>,
_component_access_set: &mut FilteredAccessSet,
_world: &mut World,
) {
}
Expand Down
Loading
Loading