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_tvrx2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/dboard/db_tvrx2.cpp') diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp index cc1249dee..6f7581953 100644 --- a/host/lib/usrp/dboard/db_tvrx2.cpp +++ b/host/lib/usrp/dboard/db_tvrx2.cpp @@ -54,9 +54,10 @@ #include #include #include +#include #include #include -#include +#include #include #include #include @@ -1966,7 +1967,8 @@ double tvrx2::set_gain(double gain, const std::string& name) **********************************************************************/ static tda18272hnm_regs_t::lp_fc_t bandwidth_to_lp_fc_reg(double& bandwidth) { - int reg = uhd::clip(boost::math::iround((bandwidth - 5.0e6) / 1.0e6), 0, 4); + int reg = + uhd::clip(uhd::narrow_cast(std::lround((bandwidth - 5.0e6)) / 1.0e6), 0, 4); switch (reg) { case 0: -- cgit v1.2.3