[libcamera-devel] [PATCH] ipa: rkisp1: Avoid unnecessary copy
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Oct 11 16:04:08 CEST 2019
Use const references in a for loop to avoid an unnecessary copy.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
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 4f5fdb146212..02419e254f2d 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -98,7 +98,7 @@ void IPARkISP1::configure(const std::map<unsigned int, IPAStream> &streamConfig,
void IPARkISP1::mapBuffers(const std::vector<IPABuffer> &buffers)
{
- for (IPABuffer buffer : buffers) {
+ for (const IPABuffer &buffer : buffers) {
bufferInfo_[buffer.id] = buffer.memory;
bufferInfo_[buffer.id].planes()[0].mem();
}
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list