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/usrp1/usrp1_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/usrp1/usrp1_impl.cpp') diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index 6ed1a6a69..d88b6af8e 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include #include @@ -533,8 +533,8 @@ void usrp1_impl::set_enb_rx_dc_offset(const std::string& db, const bool enb) std::complex usrp1_impl::set_rx_dc_offset( const std::string& db, const std::complex& offset) { - const int32_t i_off = boost::math::iround(offset.real() * (1ul << 31)); - const int32_t q_off = boost::math::iround(offset.imag() * (1ul << 31)); + const int32_t i_off = static_cast(std::lround(offset.real() * (1ul << 31))); + const int32_t q_off = static_cast(std::lround(offset.imag() * (1ul << 31))); if (db == "A") { _iface->poke32(FR_ADC_OFFSET_0, i_off); -- cgit v1.2.3