chiark / gitweb /
hidden: Provide no-op consistency_check in not(debug_assertions)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 24 Mar 2021 19:15:06 +0000 (19:15 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 24 Mar 2021 19:15:06 +0000 (19:15 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs
src/vpid.rs

index 0d31a972203e5b575e11c6386c4a861460d2bda2..b58d1bc9523bc9b8de508e83e37dc4e9341fba12 100644 (file)
@@ -722,9 +722,7 @@ mod recompute {
         }
       }
 
-      if cfg!(debug_assertions) {
-        consistency_check(gplayers, gpieces, goccults);
-      }
+      consistency_check(gplayers, gpieces, goccults);
 
       Implemented(())
     }
index e5f4a0bd87af741d16b09dd4ce5b7a9574d7ede3..1b44b5896616903807a5ec522b91f6bab1b75208 100644 (file)
@@ -364,6 +364,14 @@ pub fn permute(occid: OccId,
   dbgc!(&occ);
 }
 
+#[cfg(not(debug_assertions))]
+#[inline]
+pub fn consistency_check(
+  _gplayers: &GPlayers,
+  _gpieces: &GPieces,
+  _goccults: &GameOccults,
+) { }
+
 #[cfg(debug_assertions)]
 pub fn consistency_check(
   gplayers: &GPlayers,