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/types/ranges.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'host/lib/types') diff --git a/host/lib/types/ranges.cpp b/host/lib/types/ranges.cpp index f7fbc0f92..16edeccca 100644 --- a/host/lib/types/ranges.cpp +++ b/host/lib/types/ranges.cpp @@ -7,8 +7,8 @@ #include #include -#include #include +#include #include using namespace uhd; @@ -148,8 +148,7 @@ double meta_range_t::clip(double value, bool clip_step) const if (value <= r.stop()) { if (not clip_step or r.step() == 0) return value; - return boost::math::round((value - r.start()) / r.step()) * r.step() - + r.start(); + return std::round((value - r.start()) / r.step()) * r.step() + r.start(); } // continue on to the next range last_stop = r.stop(); -- cgit v1.2.3