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/x300/x300_dboard_iface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/x300/x300_dboard_iface.cpp') diff --git a/host/lib/usrp/x300/x300_dboard_iface.cpp b/host/lib/usrp/x300/x300_dboard_iface.cpp index 36e430985..4c7a1d55b 100644 --- a/host/lib/usrp/x300/x300_dboard_iface.cpp +++ b/host/lib/usrp/x300/x300_dboard_iface.cpp @@ -9,7 +9,7 @@ #include "x300_regs.hpp" #include #include -#include +#include using namespace uhd; using namespace uhd::usrp; @@ -218,7 +218,7 @@ void x300_dboard_iface::write_aux_dac(unit_t unit, aux_dac_t which, double value if (unit == UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported."); - _dac_regs[unit].data = boost::math::iround(4095 * value / 3.3); + _dac_regs[unit].data = static_cast(std::lround(4095 * value / 3.3)); _dac_regs[unit].cmd = ad5623_regs_t::CMD_WR_UP_DAC_CHAN_N; typedef uhd::dict aux_dac_to_addr; -- cgit v1.2.3