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_wbx_common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/dboard/db_wbx_common.cpp') diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp index df89e3779..6e306f36b 100644 --- a/host/lib/usrp/dboard/db_wbx_common.cpp +++ b/host/lib/usrp/dboard/db_wbx_common.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include using namespace uhd; @@ -31,7 +32,7 @@ static int rx_pga0_gain_to_iobits(double& gain) double attn = wbx_rx_gain_ranges["PGA0"].stop() - gain; // calculate the attenuation - int attn_code = boost::math::iround(attn * 2); + int attn_code = static_cast(std::lround(attn * 2)); int iobits = ((~attn_code) << RX_ATTN_SHIFT) & RX_ATTN_MASK; UHD_LOGGER_TRACE("WBX") -- cgit v1.2.3