[libcamera-devel] [PATCH] libcamera: pipeline: rkisp1: Avoid usage of dynamic_cast<>
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Jun 10 02:20:13 CEST 2020
Hi Laurent,
Thanks for your work.
On 2020-06-08 05:32:34 +0300, Laurent Pinchart wrote:
> The logic of the code guarantees that the PipelineHandler pointer passed
> to the RkISP1Frames constructor is an instance of PipelineHandlerRkISP1.
> We can thus use static_cast<> instead of dynamic_cast<>.
>
> 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 d807fc2cf535..094362bb0e4f 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -221,7 +221,7 @@ private:
> };
>
> RkISP1Frames::RkISP1Frames(PipelineHandler *pipe)
> - : pipe_(dynamic_cast<PipelineHandlerRkISP1 *>(pipe))
> + : pipe_(static_cast<PipelineHandlerRkISP1 *>(pipe))
> {
> }
>
> --
> 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