From f3c53dbf53b60defc61948cdfb64f79e6983e071 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 11 Oct 2019 17:14:40 +0300 Subject: libamera: pipeline: rkisp1: timeline: Fix compilation with gcc-[56] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With gcc 5 and 6, insertion in a std::multimap copies the pair passed as an argument to the insert() method. As the mapped type is a non-copyable std::unique_ptr<>, this fails to compile. Compilation with newer gcc versions succeed due to support for C++-17 and the fix described in https://cplusplus.github.io/LWG/issue2354. To support gcc 5 and 6, fix the issue by using std::multimap::emplace(). Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/rkisp1/timeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/timeline.cpp b/src/libcamera/pipeline/rkisp1/timeline.cpp index b98a1668..f6c6434d 100644 --- a/src/libcamera/pipeline/rkisp1/timeline.cpp +++ b/src/libcamera/pipeline/rkisp1/timeline.cpp @@ -123,7 +123,7 @@ void Timeline::scheduleAction(std::unique_ptr action) << ", run now " << utils::time_point_to_string(now); action->run(); } else { - actions_.insert({ deadline, std::move(action) }); + actions_.emplace(deadline, std::move(action)); updateDeadline(); } } -- cgit v1.2.1