From 7af802e1dfcdbd4d863fec9a8f88229694926860 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 22 Jun 2024 22:53:35 +0200 Subject: fix(ecs): disable system param compatability checks by default --- ecs/Cargo.toml | 1 + ecs/src/system/util.rs | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ecs/Cargo.toml b/ecs/Cargo.toml index ad0f373..069482d 100644 --- a/ecs/Cargo.toml +++ b/ecs/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" [features] debug = ["dep:tracing"] +system-param-compat-checks = [] [dependencies] seq-macro = "0.3.5" diff --git a/ecs/src/system/util.rs b/ecs/src/system/util.rs index 9175911..54fff0e 100644 --- a/ecs/src/system/util.rs +++ b/ecs/src/system/util.rs @@ -1,12 +1,15 @@ 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::() { - panic!("Atleast two parameters are incompatible"); + #[cfg(feature = "system-param-compat-checks")] + { + 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