diff options
author | HampusM <hampus@hampusmat.com> | 2024-02-25 23:25:03 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-02-26 19:54:00 +0100 |
commit | 1019924a29527eba2c8ec8bd976ece6ed76075b0 (patch) | |
tree | b26d8bd872684a0c87802e057d8952c42be31f7a /ecs/src/system/util.rs | |
parent | 00055d6af92d59a86eb00f110c77c699a562d33e (diff) |
feat(ecs): add support for multiple system queries & local components
Diffstat (limited to 'ecs/src/system/util.rs')
-rw-r--r-- | ecs/src/system/util.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ecs/src/system/util.rs b/ecs/src/system/util.rs new file mode 100644 index 0000000..9d04f1d --- /dev/null +++ b/ecs/src/system/util.rs @@ -0,0 +1,13 @@ +macro_rules! check_params_are_compatible { + ($excluded_index: tt, $param: ident, $cnt: tt) => { + seq!(N in 0..=$cnt { + if N != $excluded_index { + if !$param::is_compatible::<TParam~N>() { + panic!("Atleast two parameters are incompatible"); + } + } + }) + }; +} + +pub(crate) use check_params_are_compatible; |