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/tests/gain_group_test.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'host/tests') diff --git a/host/tests/gain_group_test.cpp b/host/tests/gain_group_test.cpp index 98a2516b8..f5239788c 100644 --- a/host/tests/gain_group_test.cpp +++ b/host/tests/gain_group_test.cpp @@ -6,13 +6,11 @@ // #include -#include #include +#include #include #include -#define rint(x) boost::math::iround(x) - using namespace uhd; /*********************************************************************** @@ -34,7 +32,7 @@ public: void set_value(double gain) { double step = get_range().step(); - _gain = step * rint(gain / step); + _gain = step * std::round(gain / step); } private: @@ -57,7 +55,7 @@ public: void set_value(double gain) { double step = get_range().step(); - _gain = step * rint(gain / step); + _gain = step * std::round(gain / step); } private: -- cgit v1.2.3