From ab28639a3d3f8001a5386065893418807e3267c7 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 14 Oct 2015 17:23:03 -0700 Subject: [PATCH] Use std::move to move samples in buffer. Yes, std::rotate works, but it's fancy and does unnecessary work. --- firmware/baseband/matched_filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/baseband/matched_filter.cpp b/firmware/baseband/matched_filter.cpp index 9ef7fdd9..5146a805 100644 --- a/firmware/baseband/matched_filter.cpp +++ b/firmware/baseband/matched_filter.cpp @@ -40,7 +40,7 @@ bool MatchedFilter::execute_once( } void MatchedFilter::shift_by_decimation_factor() { - std::rotate(&samples_[0], &samples_[decimation_factor], &samples_[taps_count_]); + std::move(&samples_[decimation_factor], &samples_[taps_count_], &samples_[0]); } } /* namespace matched_filter */