aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Csete <oz9aec@gmail.com>2016-10-02 21:43:38 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2017-02-27 22:29:18 +0100
commitc6ed80aea7fcbd45035f20c6389b2c9892bd6abe (patch)
tree9d91b688098ca4c3149dafba74983e7114ff80f9
parent3823c8efce1fd3f9b51debb5569c9419dbb38a89 (diff)
rtl, rtl_tcp: Use std::abs.
Fixes compile error on Mac OS X.
-rw-r--r--lib/rtl/rtl_source_c.cc2
-rw-r--r--lib/rtl_tcp/rtl_tcp_source_c.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rtl/rtl_source_c.cc b/lib/rtl/rtl_source_c.cc
index 93328b8..97252a7 100644
--- a/lib/rtl/rtl_source_c.cc
+++ b/lib/rtl/rtl_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;
diff --git a/lib/rtl_tcp/rtl_tcp_source_c.cc b/lib/rtl_tcp/rtl_tcp_source_c.cc
index a365688..1b2c533 100644
--- a/lib/rtl_tcp/rtl_tcp_source_c.cc
+++ b/lib/rtl_tcp/rtl_tcp_source_c.cc
@@ -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;