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/twinrx/twinrx_experts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/dboard/twinrx/twinrx_experts.cpp') diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp index 8d3ba591b..58e22e089 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include using namespace uhd::experts; using namespace uhd::math; @@ -271,7 +271,7 @@ void twinrx_chan_gain_expert::resolve() // Compute minimum gain. The user-specified gain value will be interpreted as // the gain applied on top of the minimum gain state. // If antennas are shared or swapped, the switch has 6dB of loss - size_t gain_index = std::min(static_cast(boost::math::round(_gain.get())), + size_t gain_index = std::min(static_cast(std::lround(_gain.get())), table.get_num_entries() - 1); // Translate gain to an index in the gain table -- cgit v1.2.3