[libcamera-devel] [PATCH 1/6] android: camera_metadata: Mark isValid() as const
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Jul 24 17:48:50 CEST 2020
Hi Jacopo,
Thank you for the patch.
On Fri, Jul 24, 2020 at 04:21:15PM +0200, Jacopo Mondi wrote:
> The CameraMetadata::isValid() method does not modify the object state
> and can be called on const instances of the CameraMetadata class.
>
> Mark the method as const to allow that.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/android/camera_metadata.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
> index 75a9d7066f31..348a018165ef 100644
> --- a/src/android/camera_metadata.h
> +++ b/src/android/camera_metadata.h
> @@ -17,7 +17,7 @@ public:
> CameraMetadata(size_t entryCapacity, size_t dataCapacity);
> ~CameraMetadata();
>
> - bool isValid() { return valid_; }
> + bool isValid() const { return valid_; }
> bool addEntry(uint32_t tag, const void *data, size_t data_count);
>
> camera_metadata_t *get();
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list