diff options
author | japm48 <japm48@users.noreply.github.com> | 2020-04-10 23:35:30 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-04-11 02:47:13 +0200 |
commit | 2c767bb260a25b415e8c9c4b3ea37280b2127cec (patch) | |
tree | 911eefff59b6f791f814c341b8b923b7ff2e19fc /gnuradio-runtime/lib/buffer.cc | |
parent | 60144c3e2fc6e36a9a1a6ebefbbebe41adc79c2c (diff) |
boost: remove deprecated math/common_factor.hpp
Remove deprecation warning and prefer using std::{lcm,gcd} to Boost.
Fixes #2712.
Diffstat (limited to 'gnuradio-runtime/lib/buffer.cc')
-rw-r--r-- | gnuradio-runtime/lib/buffer.cc | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc index 720c72c4ee..46d704542b 100644 --- a/gnuradio-runtime/lib/buffer.cc +++ b/gnuradio-runtime/lib/buffer.cc @@ -13,22 +13,13 @@ #endif #include "vmcircbuf.h" #include <gnuradio/buffer.h> +#include <gnuradio/integer_math.h> #include <gnuradio/math.h> #include <assert.h> #include <algorithm> #include <iostream> #include <stdexcept> -// the following header is deprecated as of Boost 1.66.0, and the -// other API was introduced in Boost 1.58.0. Since we still support -// Boost back to 1.54.0, use the older API if pre-1.5.80 and otherwise -// use the newer API. -#if (BOOST_VERSION < 105800) -#include <boost/math/common_factor_rt.hpp> -#else -#include <boost/integer/common_factor_rt.hpp> -#endif - namespace gr { static long s_buffer_count = 0; // counts for debugging storage mgmt @@ -68,13 +59,9 @@ static long s_buffer_reader_count = 0; * * type_size * nitems == k * page_size */ -static long minimum_buffer_items(long type_size, long page_size) +static inline long minimum_buffer_items(long type_size, long page_size) { -#if (BOOST_VERSION < 105800) - return page_size / boost::math::gcd(type_size, page_size); -#else - return page_size / boost::integer::gcd(type_size, page_size); -#endif + return page_size / GR_GCD(type_size, page_size); } |