[libcamera-devel] [PATCH 2/8] ipa: camera_sensor_helper: Make registerType() and createInstance() private
Jacopo Mondi
jacopo at jmondi.org
Fri Oct 7 15:38:07 CEST 2022
Hi Laurent
On Tue, Oct 04, 2022 at 12:21:22AM +0300, Laurent Pinchart via libcamera-devel wrote:
> The CameraSensorHelperFactory registerType() and createInstance()
> functions are called by the CameraSensorHelperFactory class only. Make
> them private.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/ipa/libipa/camera_sensor_helper.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/ipa/libipa/camera_sensor_helper.h b/src/ipa/libipa/camera_sensor_helper.h
> index 2042847f29e8..410156efb2ea 100644
> --- a/src/ipa/libipa/camera_sensor_helper.h
> +++ b/src/ipa/libipa/camera_sensor_helper.h
> @@ -66,15 +66,15 @@ public:
>
> static std::unique_ptr<CameraSensorHelper> create(const std::string &name);
>
> - static void registerType(CameraSensorHelperFactory *factory);
> static std::vector<CameraSensorHelperFactory *> &factories();
>
> -protected:
> - virtual CameraSensorHelper *createInstance() const = 0;
Maybe we made it protected because this was meant to be overridden by
the sub-classes ? Making it private is indeed fine
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Thanks
j
> -
> private:
> LIBCAMERA_DISABLE_COPY_AND_MOVE(CameraSensorHelperFactory)
>
> + static void registerType(CameraSensorHelperFactory *factory);
> +
> + virtual CameraSensorHelper *createInstance() const = 0;
> +
> std::string name_;
> };
>
> --
> Regards,
>
> Laurent Pinchart
>
More information about the libcamera-devel
mailing list