From 692cbf3130a1816a1602d4d942b1660681e4c32b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 27 Apr 2019 18:39:20 +0200 Subject: [PATCH] Do not use std::cbegin, not available in old versions of gcc --- src/algorithms/tracking/libs/exponential_smoother.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/tracking/libs/exponential_smoother.cc b/src/algorithms/tracking/libs/exponential_smoother.cc index f8f19be64..204a1afb1 100644 --- a/src/algorithms/tracking/libs/exponential_smoother.cc +++ b/src/algorithms/tracking/libs/exponential_smoother.cc @@ -116,7 +116,7 @@ float Exponential_Smoother::smooth(float raw) init_buffer_.push_back(smoothed_value); if (init_counter_ == samples_for_initialization_) { - old_value_ = std::accumulate(std::cbegin(init_buffer_), std::cend(init_buffer_), 0.0F) / static_cast(init_buffer_.size()); + old_value_ = std::accumulate(std::begin(init_buffer_), std::end(init_buffer_), 0.0F) / static_cast(init_buffer_.size()); if (old_value_ < (min_value_ + offset_)) { // flush buffer and start again