Browse Source

DebugAssert now NOP in release mode.

Mark Sibly 9 years ago
parent
commit
6b320484b9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      modules/monkey/native/bbassert.h

+ 4 - 0
modules/monkey/native/bbassert.h

@@ -13,11 +13,15 @@ inline void bbAssert( bool cond,bbString msg ){
 }
 
 inline void bbDebugAssert( bool cond ){
+#ifndef NDEBUG
 	if( !cond ) throw new bbException( "Assert failed" );
+#endif
 }
 
 inline void bbDebugAssert( bool cond,bbString msg ){
+#ifndef NDEBUG
 	if( !cond ) throw new bbException( msg );
+#endif
 }
 
 #endif