[libcamera-devel] [PATCH 2/4] android: camera_metadata: Constify argument to addEntry() and updateEntry()

Hirokazu Honda hiroh at chromium.org
Mon May 17 05:39:47 CEST 2021


Hi Laurent,



On Sun, May 16, 2021 at 3:38 AM Laurent Pinchart <
laurent.pinchart at ideasonboard.com> wrote:

> The addEntry() and updateEntry() overrides that take a reference to a
> container don't need to modify the container. Make it const.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>

Reviewed-by: Hirokazu Honda <hiroh at chromium.org>


> ---
>  src/android/camera_metadata.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
> index 56df6f1c9008..f95c34581fe4 100644
> --- a/src/android/camera_metadata.h
> +++ b/src/android/camera_metadata.h
> @@ -42,7 +42,7 @@ public:
>
>         template<typename S,
>                  typename T = typename S::value_type>
> -       bool addEntry(uint32_t tag, S &data)
> +       bool addEntry(uint32_t tag, const S &data)
>         {
>                 return addEntry(tag, data.data(), data.size(), sizeof(T));
>         }
> @@ -67,7 +67,7 @@ public:
>
>         template<typename S,
>                  typename T = typename S::value_type>
> -       bool updateEntry(uint32_t tag, S &data)
> +       bool updateEntry(uint32_t tag, const S &data)
>         {
>                 return updateEntry(tag, data.data(), data.size());
>         }
> --
> Regards,
>
> Laurent Pinchart
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210517/fa935cab/attachment.htm>


More information about the libcamera-devel mailing list