From 7dcdf93cdbe704bf6cc07ec758c708708f1a3277 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Thu, 6 Dec 2018 13:14:31 -0500 Subject: lmx2592: Better "abs()" compiler compatibility Use "std::abs" instead of "abs" for better compiler compatibility --- host/lib/usrp/common/lmx2592.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp') 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 -- cgit v1.2.3