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/dboard/db_rfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/dboard/db_rfx.cpp') diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index f4de7ccaa..ff26c2d29 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include using namespace uhd; @@ -441,7 +441,7 @@ double rfx_xcvr::set_lo_freq(dboard_iface::unit_t unit, double target_freq) // calculate B and A from N double N = target_freq * R / ref_freq; B = int(std::floor(N / P)); - A = boost::math::iround(N - P * B); + A = static_cast(std::lround(N - P * B)); if (B < A or B > 8191 or B < 3 or A > 31) { continue; // constraints on A, B } -- cgit v1.2.3