From 3747cb50c9993dd8125f380cdc6e9861836d03fb Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Mon, 2 Aug 2021 20:37:57 +0100 Subject: [PATCH] wxCHECK_MSG instead of assert --- include/core/kicad_algo.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/core/kicad_algo.h b/include/core/kicad_algo.h index a16150ab16..2eefbf0fa4 100644 --- a/include/core/kicad_algo.h +++ b/include/core/kicad_algo.h @@ -26,9 +26,9 @@ #define INCLUDE_CORE_KICAD_ALGO_H_ #include -#include #include // std::function #include // std::pair +#include // wxCHECK_MSG namespace alg { @@ -127,10 +127,7 @@ bool pair_contains( const std::pair<_Type, _Type> __pair, _Value __value ) template bool within_wrapped_range( T __val, T __minval, T __maxval, T __wrap ) { - assert( __wrap > 0 ); // Wrap must be positive! - - if( __wrap <= 0 ) - return false; + wxCHECK_MSG( __wrap > 0, false, "Wrap must be positive!" ); while( __maxval >= __wrap ) __maxval -= __wrap;