[libcamera-devel] [PATCH] ipa: rkisp1: Avoid unnecessary copy

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Oct 11 16:23:29 CEST 2019


Hi Laurent,

Thanks for your patch.

On 2019-10-11 17:04:08 +0300, Laurent Pinchart wrote:
> 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) {

d00h,

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

>  		bufferInfo_[buffer.id] = buffer.memory;
>  		bufferInfo_[buffer.id].planes()[0].mem();
>  	}
> -- 
> Regards,
> 
> Laurent Pinchart
> 

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list