From 8647991cd8310463d1f5d08698f277e2278e77d9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 11 Oct 2019 17:02:27 +0300 Subject: ipa: rkisp1: Avoid unnecessary copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use const references in a for loop to avoid an unnecessary copy. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/ipa/rkisp1/rkisp1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 4f5fdb14..02419e25 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -98,7 +98,7 @@ void IPARkISP1::configure(const std::map &streamConfig, void IPARkISP1::mapBuffers(const std::vector &buffers) { - for (IPABuffer buffer : buffers) { + for (const IPABuffer &buffer : buffers) { bufferInfo_[buffer.id] = buffer.memory; bufferInfo_[buffer.id].planes()[0].mem(); } -- cgit v1.2.1