Skip to content

Commit

Permalink
unify exclusive system params with normal system params
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDoot committed Dec 4, 2024
1 parent 477eb0a commit 150266d
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 542 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ pub fn impl_param_set(_input: TokenStream) -> TokenStream {
change_tick,
}
}

fn is_exclusive() -> bool {
false #(|| <#param as SystemParam>::is_exclusive())*
}
}

impl<'w, 's, #(#param: SystemParam,)*> ParamSet<'w, 's, (#(#param,)*)>
Expand Down
19 changes: 1 addition & 18 deletions crates/bevy_ecs/src/schedule/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ pub use bevy_ecs_macros::{ScheduleLabel, SystemSet};
use crate::{
define_label,
intern::Interned,
system::{
ExclusiveFunctionSystem, ExclusiveSystemParamFunction, FunctionSystem,
IsExclusiveFunctionSystem, IsFunctionSystem, SystemParamFunction,
},
system::{FunctionSystem, IsFunctionSystem, SystemParamFunction},
};

define_label!(
Expand Down Expand Up @@ -187,20 +184,6 @@ where
}
}

// exclusive systems
impl<Marker, F> IntoSystemSet<(IsExclusiveFunctionSystem, Marker)> for F
where
Marker: 'static,
F: ExclusiveSystemParamFunction<Marker>,
{
type Set = SystemTypeSet<ExclusiveFunctionSystem<Marker, F>>;

#[inline]
fn into_system_set(self) -> Self::Set {
SystemTypeSet::<ExclusiveFunctionSystem<Marker, F>>::new()
}
}

#[cfg(test)]
mod tests {
use crate::{
Expand Down
330 changes: 0 additions & 330 deletions crates/bevy_ecs/src/system/exclusive_function_system.rs

This file was deleted.

Loading

0 comments on commit 150266d

Please sign in to comment.