[libcamera-devel,6/8] libcamera: pipeline_handler: Make registerType() private
diff mbox series

Message ID 20221003212128.32429-7-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: Use class templates for auto-registration
Related show

Commit Message

Laurent Pinchart Oct. 3, 2022, 9:21 p.m. UTC
The PipelineHandlerFactory::registerType() function is called by the
PipelineHandlerFactory class only. Make it private.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 include/libcamera/internal/pipeline_handler.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Xavier Roumegue Oct. 5, 2022, 11:10 a.m. UTC | #1
Hi Laurent,

Thanks for the patch.

On 10/3/22 23:21, Laurent Pinchart via libcamera-devel wrote:
> The PipelineHandlerFactory::registerType() function is called by the
> PipelineHandlerFactory class only. Make it private.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>   include/libcamera/internal/pipeline_handler.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
> index 46df69dc789a..ebbdf2aa391f 100644
> --- a/include/libcamera/internal/pipeline_handler.h
> +++ b/include/libcamera/internal/pipeline_handler.h
> @@ -108,10 +108,11 @@ public:
>   
>   	const std::string &name() const { return name_; }
>   
> -	static void registerType(PipelineHandlerFactory *factory);
>   	static std::vector<PipelineHandlerFactory *> &factories();
>   
>   private:
> +	static void registerType(PipelineHandlerFactory *factory);
> +
>   	virtual PipelineHandler *createInstance(CameraManager *manager) const = 0;
>   
>   	std::string name_;


Reviewed-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
Jacopo Mondi Oct. 7, 2022, 2:10 p.m. UTC | #2
Hi Laurent

On Tue, Oct 04, 2022 at 12:21:26AM +0300, Laurent Pinchart via libcamera-devel wrote:
> The PipelineHandlerFactory::registerType() function is called by the
> PipelineHandlerFactory class only. Make it private.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

here you go!

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> ---
>  include/libcamera/internal/pipeline_handler.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
> index 46df69dc789a..ebbdf2aa391f 100644
> --- a/include/libcamera/internal/pipeline_handler.h
> +++ b/include/libcamera/internal/pipeline_handler.h
> @@ -108,10 +108,11 @@ public:
>
>  	const std::string &name() const { return name_; }
>
> -	static void registerType(PipelineHandlerFactory *factory);
>  	static std::vector<PipelineHandlerFactory *> &factories();
>
>  private:
> +	static void registerType(PipelineHandlerFactory *factory);
> +
>  	virtual PipelineHandler *createInstance(CameraManager *manager) const = 0;
>
>  	std::string name_;
> --
> Regards,
>
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 46df69dc789a..ebbdf2aa391f 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -108,10 +108,11 @@  public:
 
 	const std::string &name() const { return name_; }
 
-	static void registerType(PipelineHandlerFactory *factory);
 	static std::vector<PipelineHandlerFactory *> &factories();
 
 private:
+	static void registerType(PipelineHandlerFactory *factory);
+
 	virtual PipelineHandler *createInstance(CameraManager *manager) const = 0;
 
 	std::string name_;