[libcamera-devel] [PATCH 02/10] libcamera: pipeline_handler: Declare factory children classes as final
Niklas Söderlund
niklas.soderlund at ragnatech.se
Thu Jan 24 17:38:40 CET 2019
Hi Laurent,
Thanks for your work.
On 2019-01-24 12:16:43 +0200, Laurent Pinchart wrote:
> Nothing should inherit from the factory classes created by the
> REGISTER_PIPELINE_HANDLER() macro. Declare them as final instead of only
> declaring their create() method final.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/libcamera/include/pipeline_handler.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h
> index 7bb07d1ec5c7..1da6dc758ca6 100644
> --- a/src/libcamera/include/pipeline_handler.h
> +++ b/src/libcamera/include/pipeline_handler.h
> @@ -46,11 +46,11 @@ private:
> };
>
> #define REGISTER_PIPELINE_HANDLER(handler) \
> -class handler##Factory : public PipelineHandlerFactory \
> +class handler##Factory final : public PipelineHandlerFactory \
> { \
> public: \
> handler##Factory() : PipelineHandlerFactory(#handler) {} \
> - PipelineHandler *create(CameraManager *manager) final \
> + PipelineHandler *create(CameraManager *manager) \
> { \
> return new handler(manager); \
> } \
> --
> 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