From 188fbb17cfd18c87f60ec56f62476f97ef2779bb Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 19 Jun 2021 00:06:52 +0200 Subject: uhd: Remove all occurences of boost::math::*round() Its behaviour is almost identical to std::lround, which we use instead. The only downside of std::lround is that it always returns a long, which we don't always need. We thus add some casts for those cases to make the compiler happy. --- host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_device.cpp') diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index 9e088871d..9275c83f5 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -5,17 +5,16 @@ // SPDX-License-Identifier: GPL-3.0-or-later // +#define _USE_MATH_DEFINES #include "ad9361_device.h" #include "ad9361_client.h" #include "ad9361_filter_taps.h" #include "ad9361_gain_tables.h" #include "ad9361_synth_lut.h" -#define _USE_MATH_DEFINES #include #include #include #include -#include #include #include #include @@ -1237,7 +1236,7 @@ double ad9361_device_t::_tune_bbvco(const double rate) int nint = static_cast(vcorate / fref); UHD_LOG_TRACE("AD936X", "[ad9361_device_t::_tune_bbvco] (nint)=" << (vcorate / fref)); int nfrac = static_cast( - boost::math::round(((vcorate / fref) - (double)nint) * (double)modulus)); + std::lround(((vcorate / fref) - (double)nint) * (double)modulus)); UHD_LOG_TRACE("AD936X", "[ad9361_device_t::_tune_bbvco] (nfrac)=" << ((vcorate / fref) - (double)nint) * (double)modulus); -- cgit v1.2.3