[libcamera-devel] [PATCH] libcamera: pipeline: rkisp1: Avoid usage of dynamic_cast<>
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Jun 8 04:32:34 CEST 2020
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>
---
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
More information about the libcamera-devel
mailing list