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_version3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/dboard/db_wbx_version3.cpp') diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp index 51902b3aa..599119899 100644 --- a/host/lib/usrp/dboard/db_wbx_version3.cpp +++ b/host/lib/usrp/dboard/db_wbx_version3.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include using namespace uhd; @@ -44,7 +44,7 @@ static int tx_pga0_gain_to_iobits(double& gain) double attn = wbx_v3_tx_gain_ranges["PGA0"].stop() - gain; // calculate the attenuation - int attn_code = boost::math::iround(attn); + int attn_code = static_cast(std::lround(attn)); int iobits = ((attn_code & 16 ? 0 : TX_ATTN_16) | (attn_code & 8 ? 0 : TX_ATTN_8) | (attn_code & 4 ? 0 : TX_ATTN_4) | (attn_code & 2 ? 0 : TX_ATTN_2) | (attn_code & 1 ? 0 : TX_ATTN_1)) -- cgit v1.2.3