summarylogtreecommitdiffstats
path: root/pr-1092.patch
diff options
context:
space:
mode:
authorXiretza2021-12-29 11:10:14 +0100
committerXiretza2021-12-29 11:10:14 +0100
commit18d2e4f17af778115b3c749bf25ff680221e3b37 (patch)
treea1d14e9fda16f4eb7348ee0cc44110418231f72f /pr-1092.patch
parentcc31162ede29ae1ec84dd7f8053e6d75208bd9a1 (diff)
downloadaur-18d2e4f17af778115b3c749bf25ff680221e3b37.tar.gz
Fix compilation with boost >= 1.77
Diffstat (limited to 'pr-1092.patch')
-rw-r--r--pr-1092.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/pr-1092.patch b/pr-1092.patch
new file mode 100644
index 000000000000..568fd8e3a3f9
--- /dev/null
+++ b/pr-1092.patch
@@ -0,0 +1,78 @@
+From cc3f4ab2f8eeddeee6ce9740b940c8c07e4031bf Mon Sep 17 00:00:00 2001
+From: Jon Beniston <jon@beniston.com>
+Date: Tue, 28 Dec 2021 11:31:15 +0000
+Subject: [PATCH] Fix for #1087. Support compilation with Boost >= 1.77
+
+---
+ plugins/channelrx/noisefigure/noisefigure.cpp | 9 ++++++++-
+ .../channelrx/noisefigure/noisefigureenrdialog.cpp | 11 ++++++++++-
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/channelrx/noisefigure/noisefigure.cpp b/plugins/channelrx/noisefigure/noisefigure.cpp
+index a6a08d413..646fbf065 100644
+--- a/plugins/channelrx/noisefigure/noisefigure.cpp
++++ b/plugins/channelrx/noisefigure/noisefigure.cpp
+@@ -16,6 +16,7 @@
+ // along with this program. If not, see <http://www.gnu.org/licenses/>. //
+ ///////////////////////////////////////////////////////////////////////////////////
+
++#include <boost/version.hpp>
+ #include <boost/math/interpolators/barycentric_rational.hpp>
+
+ #include "noisefigure.h"
+@@ -41,6 +42,12 @@
+ #include "channel/channelwebapiutils.h"
+ #include "maincore.h"
+
++#if BOOST_VERSION < 107700
++using namespace boost::math;
++#else
++using namespace boost::math::interpolators;
++#endif
++
+ MESSAGE_CLASS_DEFINITION(NoiseFigure::MsgConfigureNoiseFigure, Message)
+ MESSAGE_CLASS_DEFINITION(NoiseFigure::MsgPowerMeasurement, Message)
+ MESSAGE_CLASS_DEFINITION(NoiseFigure::MsgNFMeasurement, Message)
+@@ -180,7 +187,7 @@ double NoiseFigure::calcENR(double frequency)
+ else
+ {
+ int order = size - 1;
+- boost::math::barycentric_rational<double> interpolant(std::move(x), std::move(y), order);
++ barycentric_rational<double> interpolant(std::move(x), std::move(y), order);
+ enr = interpolant(frequency);
+ }
+ }
+diff --git a/plugins/channelrx/noisefigure/noisefigureenrdialog.cpp b/plugins/channelrx/noisefigure/noisefigureenrdialog.cpp
+index 1200fe989..e51afe232 100644
+--- a/plugins/channelrx/noisefigure/noisefigureenrdialog.cpp
++++ b/plugins/channelrx/noisefigure/noisefigureenrdialog.cpp
+@@ -17,11 +17,20 @@
+
+ #include <QDebug>
+
++#include <array>
++
++#include <boost/version.hpp>
+ #include <boost/math/interpolators/barycentric_rational.hpp>
+
+ #include "noisefigureenrdialog.h"
+ #include "util/interpolation.h"
+
++#if BOOST_VERSION < 107700
++using namespace boost::math;
++#else
++using namespace boost::math::interpolators;
++#endif
++
+ NoiseFigureENRDialog::NoiseFigureENRDialog(NoiseFigureSettings *settings, QWidget* parent) :
+ QDialog(parent),
+ m_settings(settings),
+@@ -153,7 +162,7 @@ void NoiseFigureENRDialog::plotChart()
+ y[i] = points[i][1];
+ }
+ int order = size - 1;
+- boost::math::barycentric_rational<double> interpolant(std::move(x), std::move(y), order);
++ barycentric_rational<double> interpolant(std::move(x), std::move(y), order);
+
+ x.resize(size);
+ y.resize(size);