X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-vivo%2Fsrc%2Fcodecs%2Fmod.rs;fp=nihav-vivo%2Fsrc%2Fcodecs%2Fmod.rs;h=e869c8dfff7095a2026079a4d4d68653588bca91;hp=ea95f239ce4e1017ff93a87d6ee6c91d23a4166e;hb=71d7f39706f0f5004820f8d1d36c87d5f9ec3e97;hpb=a970b2110488aeff5855743d1728ee83462e8306 diff --git a/nihav-vivo/src/codecs/mod.rs b/nihav-vivo/src/codecs/mod.rs index ea95f23..e869c8d 100644 --- a/nihav-vivo/src/codecs/mod.rs +++ b/nihav-vivo/src/codecs/mod.rs @@ -1,9 +1,14 @@ use nihav_core::codecs::*; #[allow(unused_macros)] +#[cfg(debug_assertions)] macro_rules! validate { ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } }; } +#[cfg(not(debug_assertions))] +macro_rules! validate { + ($a:expr) => { if !$a { return Err(DecoderError::InvalidData); } }; +} #[cfg(any(feature="decoder_vivo1", feature="decoder_vivo2"))] #[allow(clippy::useless_let_if_seq)]