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/usrp2/clock_ctrl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/usrp2/clock_ctrl.cpp') diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp index 324826dc0..8c5801bda 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.cpp +++ b/host/lib/usrp/usrp2/clock_ctrl.cpp @@ -13,9 +13,8 @@ #include #include #include -#include -#include -#include +#include +#include using namespace uhd; @@ -317,7 +316,7 @@ public: // offset_ns = 0.34 + (1600 - i_ramp_ua)*1e-4 + ((caps-1)/ramp)*6 // delay_ns = offset_ns + range_ns * delay / 31 - int delay_val = boost::math::iround(delay / 9.744e-9 * 31); + int delay_val = static_cast(std::lround(delay / 9.744e-9 * 31)); if (delay_val == 0) { switch (clk_regs.exp) { -- cgit v1.2.3