From 2830b6815e1bfe2bbafe5130b83c4fa34f077514 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Sun, 24 Jan 2021 20:52:12 +0100 Subject: [PATCH] Fix compilation in C++17 --- include/PlotJuggler/alphanum.hpp | 3 ++- src/transforms/moving_average_filter.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/PlotJuggler/alphanum.hpp b/include/PlotJuggler/alphanum.hpp index 8c3594d89..54d5788cf 100644 --- a/include/PlotJuggler/alphanum.hpp +++ b/include/PlotJuggler/alphanum.hpp @@ -303,8 +303,9 @@ namespace doj Algorithm". If the objects are no std::string, they must implement "std::ostream operator<< (std::ostream&, const Ty&)". */ + template - struct alphanum_less : public std::binary_function + struct alphanum_less { bool operator()(const Ty& left, const Ty& right) const { diff --git a/src/transforms/moving_average_filter.cpp b/src/transforms/moving_average_filter.cpp index 8dac05009..4873afea0 100644 --- a/src/transforms/moving_average_filter.cpp +++ b/src/transforms/moving_average_filter.cpp @@ -6,6 +6,7 @@ MovingAverageFilter::MovingAverageFilter() : ui(new Ui::MovingAverageFilter), _widget(new QWidget()), + _buffer(1), _ring_view( _buffer.begin(), _buffer.end() ) { ui->setupUi(_widget);