diff options
author | Michael Dickens <mlk@alum.mit.edu> | 2018-12-06 13:14:31 -0500 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2018-12-12 19:23:21 -0800 |
commit | 7dcdf93cdbe704bf6cc07ec758c708708f1a3277 (patch) | |
tree | f35218306d63705e7b424641fb423ca44b952239 | |
parent | e0afd4a08d2cb1c53281275bc259fca6a33e9974 (diff) | |
download | uhd-7dcdf93cdbe704bf6cc07ec758c708708f1a3277.tar.gz uhd-7dcdf93cdbe704bf6cc07ec758c708708f1a3277.tar.bz2 uhd-7dcdf93cdbe704bf6cc07ec758c708708f1a3277.zip |
lmx2592: Better "abs()" compiler compatibility
Use "std::abs" instead of "abs" for better compiler compatibility
-rw-r--r-- | host/lib/usrp/common/lmx2592.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/usrp/common/lmx2592.cpp b/host/lib/usrp/common/lmx2592.cpp index c10a36ed2..31509232e 100644 --- a/host/lib/usrp/common/lmx2592.cpp +++ b/host/lib/usrp/common/lmx2592.cpp @@ -682,16 +682,16 @@ private: // Members // shift away from the closest integer boundary i.e. towards 0.5 const double delta_fnum_sign = ((((double)fnum) / ((double)fden)) < 0.5) ? 1 : -1; - while (abs(min_offset.first) < spur_dodging_threshold) + while (std::abs(min_offset.first) < spur_dodging_threshold) { double shift = spur_dodging_threshold; // if the spur is in the same direction as the desired shift direction... if (std::signbit(min_offset.first) == std::signbit(delta_fnum_sign)) { - shift += abs(min_offset.first); + shift += std::abs(min_offset.first); } else { - shift -= abs(min_offset.first); + shift -= std::abs(min_offset.first); } // convert shift of IF value to shift of Frf_in |