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;