rtl, rtl_tcp: Use std::abs.

Fixes compile error on Mac OS X.
soapy_support
Alexandru Csete 6 years ago committed by Dimitri Stolnikov
parent 3823c8efce
commit c6ed80aea7
  1. 2
      lib/rtl/rtl_source_c.cc
  2. 2
      lib/rtl_tcp/rtl_tcp_source_c.cc

@ -661,7 +661,7 @@ double rtl_source_c::set_if_gain(double gain, size_t chan)
sum += gains[ j + 1 ];
}
double err = abs(gain - sum);
double err = std::abs(gain - sum);
if (err < error) {
error = err;
gains[ i + 1 ] = g;

@ -432,7 +432,7 @@ double rtl_tcp_source_c::set_if_gain(double gain, size_t chan)
sum += gains[ j + 1 ];
}
double err = abs(gain - sum);
double err = std::abs(gain - sum);
if (err < error) {
error = err;
gains[ i + 1 ] = g;

Loading…
Cancel
Save