From bd627c91819ea98e551b29027de6eaaccbe45ed6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 29 Feb 2024 19:01:10 +0100 Subject: feat(ecs): allow up to 15 system parameters --- ecs/src/system/stateful.rs | 4 ++-- ecs/src/system/util.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ecs/src/system') diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs index 54f9807..7b136cf 100644 --- a/ecs/src/system/stateful.rs +++ b/ecs/src/system/stateful.rs @@ -25,7 +25,7 @@ pub struct Stateful macro_rules! impl_system { ($c: tt) => { - seq!(I in 0..=$c { + seq!(I in 0..$c { impl<'world, Func, #(TParam~I,)*> System for Stateful where @@ -150,6 +150,6 @@ macro_rules! impl_system { }; } -seq!(C in 0..4 { +seq!(C in 1..16 { impl_system!(C); }); diff --git a/ecs/src/system/util.rs b/ecs/src/system/util.rs index 9d04f1d..9175911 100644 --- a/ecs/src/system/util.rs +++ b/ecs/src/system/util.rs @@ -1,6 +1,6 @@ macro_rules! check_params_are_compatible { ($excluded_index: tt, $param: ident, $cnt: tt) => { - seq!(N in 0..=$cnt { + seq!(N in 0..$cnt { if N != $excluded_index { if !$param::is_compatible::() { panic!("Atleast two parameters are incompatible"); -- cgit v1.2.3-18-g5258