summaryrefslogtreecommitdiff
path: root/ecs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-02-29 19:01:10 +0100
committerHampusM <hampus@hampusmat.com>2024-02-29 19:53:36 +0100
commitbd627c91819ea98e551b29027de6eaaccbe45ed6 (patch)
tree8d315e355cec3b5e63e46fe53f88b9259eafb3c1 /ecs
parent21c582507ae2dc9d264c80719e39ac47d3b0122b (diff)
feat(ecs): allow up to 15 system parameters
Diffstat (limited to 'ecs')
-rw-r--r--ecs/src/system.rs4
-rw-r--r--ecs/src/system/stateful.rs4
-rw-r--r--ecs/src/system/util.rs2
-rw-r--r--ecs/src/tuple.rs2
4 files changed, 6 insertions, 6 deletions
diff --git a/ecs/src/system.rs b/ecs/src/system.rs
index cbf004f..a49edda 100644
--- a/ecs/src/system.rs
+++ b/ecs/src/system.rs
@@ -37,7 +37,7 @@ pub trait System<Impl>: 'static
macro_rules! impl_system {
($c: tt) => {
- seq!(I in 0..=$c {
+ seq!(I in 0..$c {
impl<'world, Func, #(TParam~I,)*> System<fn(#(TParam~I,)*)>
for Func
where
@@ -104,7 +104,7 @@ macro_rules! impl_system {
};
}
-seq!(C in 0..=4 {
+seq!(C in 1..16 {
impl_system!(C);
});
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<Func>
macro_rules! impl_system {
($c: tt) => {
- seq!(I in 0..=$c {
+ seq!(I in 0..$c {
impl<'world, Func, #(TParam~I,)*> System<fn(&'world (), #(TParam~I,)*)>
for Stateful<Func>
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::<TParam~N>() {
panic!("Atleast two parameters are incompatible");
diff --git a/ecs/src/tuple.rs b/ecs/src/tuple.rs
index 41ca4b3..bb27f58 100644
--- a/ecs/src/tuple.rs
+++ b/ecs/src/tuple.rs
@@ -132,6 +132,6 @@ macro_rules! impl_tuple_traits {
};
}
-seq!(N in 0..4 {
+seq!(N in 0..16 {
impl_tuple_traits!(N);
});