[libcamera-devel] [PATCH v2 01/14] libcamera: pipeline: rkisp1: Avoid copy assignment of V4L2 control map

Niklas Söderlund niklas.soderlund at ragnatech.se
Sun Oct 13 17:18:42 CEST 2019


Hi Laurent,

Thanks for your work.

On 2019-10-12 21:43:54 +0300, Laurent Pinchart wrote:
> Use the std::map::emplace() method to avoid unnecessary creation of an
> empty V4L2ControlInfoMap folled by a copy assignment.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

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

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 029d5868d11f..32b023730009 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -777,7 +777,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)
>  	};
>  
>  	std::map<unsigned int, V4L2ControlInfoMap> entityControls;
> -	entityControls[0] = data->sensor_->controls();
> +	entityControls.emplace(0, data->sensor_->controls());
>  
>  	data->ipa_->configure(streamConfig, entityControls);
>  
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list