diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-06-19 00:06:52 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-24 12:00:49 -0500 |
commit | 188fbb17cfd18c87f60ec56f62476f97ef2779bb (patch) | |
tree | e88b9fb8436aa42f3ecbdc0403751a3e68bbbac8 /host/lib/usrp/dboard/db_rfx.cpp | |
parent | 78ec29b6becd53f79a0ae282ae22c38bedb887d1 (diff) | |
download | uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.tar.gz uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.tar.bz2 uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.zip |
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.
Diffstat (limited to 'host/lib/usrp/dboard/db_rfx.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_rfx.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index f4de7ccaa..ff26c2d29 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -35,7 +35,7 @@ #include <uhd/utils/static.hpp> #include <boost/assign/list_of.hpp> #include <boost/format.hpp> -#include <boost/math/special_functions/round.hpp> +#include <cmath> #include <functional> using namespace uhd; @@ -441,7 +441,7 @@ double rfx_xcvr::set_lo_freq(dboard_iface::unit_t unit, double target_freq) // calculate B and A from N double N = target_freq * R / ref_freq; B = int(std::floor(N / P)); - A = boost::math::iround(N - P * B); + A = static_cast<int>(std::lround(N - P * B)); if (B < A or B > 8191 or B < 3 or A > 31) { continue; // constraints on A, B } |