[libcamera-devel] [PATCH] libcamera: Mark logPrefix() implementations with override
Niklas Söderlund
niklas.soderlund at ragnatech.se
Fri Jun 5 19:46:50 CEST 2020
Hi Laurent,
Thanks for your work.
On 2020-06-04 03:41:06 +0300, Laurent Pinchart wrote:
> Virtual functions overriden in derived classes should be marked with the
> override keyword. Do so for the logPrefix() implementations inheriting
> from the Loggable class.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> include/libcamera/internal/camera_sensor.h | 2 +-
> include/libcamera/internal/media_device.h | 2 +-
> include/libcamera/internal/v4l2_subdevice.h | 2 +-
> include/libcamera/internal/v4l2_videodevice.h | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
> index d79bd9ce9d58..eb464114cb3a 100644
> --- a/include/libcamera/internal/camera_sensor.h
> +++ b/include/libcamera/internal/camera_sensor.h
> @@ -66,7 +66,7 @@ public:
> int sensorInfo(CameraSensorInfo *info) const;
>
> protected:
> - std::string logPrefix() const;
> + std::string logPrefix() const override;
>
> private:
> const MediaEntity *entity_;
> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
> index 19af059d9291..20e397ccac49 100644
> --- a/include/libcamera/internal/media_device.h
> +++ b/include/libcamera/internal/media_device.h
> @@ -55,7 +55,7 @@ public:
> Signal<MediaDevice *> disconnected;
>
> protected:
> - std::string logPrefix() const;
> + std::string logPrefix() const override;
>
> private:
> int open();
> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
> index 1be454f0ddda..07dc93d98776 100644
> --- a/include/libcamera/internal/v4l2_subdevice.h
> +++ b/include/libcamera/internal/v4l2_subdevice.h
> @@ -62,7 +62,7 @@ public:
> const std::string &entity);
>
> protected:
> - std::string logPrefix() const;
> + std::string logPrefix() const override;
>
> private:
> std::vector<unsigned int> enumPadCodes(unsigned int pad);
> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
> index dc259523599c..cbaee6149f34 100644
> --- a/include/libcamera/internal/v4l2_videodevice.h
> +++ b/include/libcamera/internal/v4l2_videodevice.h
> @@ -213,7 +213,7 @@ public:
> V4L2PixelFormat toV4L2PixelFormat(const PixelFormat &pixelFormat);
>
> protected:
> - std::string logPrefix() const;
> + std::string logPrefix() const override;
>
> private:
> int getFormatMeta(V4L2DeviceFormat *format);
> --
> 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