diff --git a/eeschema/navlib/nl_schematic_plugin.cpp b/eeschema/navlib/nl_schematic_plugin.cpp index 0f6621653e..e38cb1e49a 100644 --- a/eeschema/navlib/nl_schematic_plugin.cpp +++ b/eeschema/navlib/nl_schematic_plugin.cpp @@ -48,7 +48,7 @@ void NL_SCHEMATIC_PLUGIN::SetCanvas( EDA_DRAW_PANEL_GAL* aViewport ) #else -NL_SCHEMATIC_PLUGIN::NL_SCHEMATIC_PLUGIN( EDA_DRAW_PANEL_GAL* aViewport ) +NL_SCHEMATIC_PLUGIN::NL_SCHEMATIC_PLUGIN() { } diff --git a/libs/kimath/include/math/util.h b/libs/kimath/include/math/util.h index 0aee29bd46..9ec90a892b 100644 --- a/libs/kimath/include/math/util.h +++ b/libs/kimath/include/math/util.h @@ -34,6 +34,7 @@ #define UTIL_H #include +#include #include #include #include @@ -129,18 +130,18 @@ int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator ); * @return true if the values considered equal within the specified epsilon, otherwise false. */ template -typename std::enable_if::is_integer, bool>::type +typename std::enable_if::value, bool>::type equals( T aFirst, T aSecond, T aEpsilon = std::numeric_limits::epsilon() ) { - T diff = fabs( aFirst - aSecond ); + T diff = std::abs( aFirst - aSecond ); if( diff < aEpsilon ) { return true; } - aFirst = fabs( aFirst ); - aSecond = fabs( aSecond ); + aFirst = std::abs( aFirst ); + aSecond = std::abs( aSecond ); T largest = aFirst > aSecond ? aFirst : aSecond; if( diff <= largest * aEpsilon )