1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Do not use std::cbegin, not available in old versions of gcc

This commit is contained in:
Carles Fernandez 2019-04-27 18:39:20 +02:00
parent c1b48d675a
commit 692cbf3130
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -116,7 +116,7 @@ float Exponential_Smoother::smooth(float raw)
init_buffer_.push_back(smoothed_value); init_buffer_.push_back(smoothed_value);
if (init_counter_ == samples_for_initialization_) if (init_counter_ == samples_for_initialization_)
{ {
old_value_ = std::accumulate(std::cbegin(init_buffer_), std::cend(init_buffer_), 0.0F) / static_cast<float>(init_buffer_.size()); old_value_ = std::accumulate(std::begin(init_buffer_), std::end(init_buffer_), 0.0F) / static_cast<float>(init_buffer_.size());
if (old_value_ < (min_value_ + offset_)) if (old_value_ < (min_value_ + offset_))
{ {
// flush buffer and start again // flush buffer and start again