summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-05-15 20:38:55 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-05-18 14:45:29 +0300
commit6dcfba2e9d65b0439265ae267a436b40bb222e4d (patch)
tree16c0e43add0c108b856af33d6221e466fef5c6da
parent64586e7d6e6230553d9ce7d6022a85008db020c4 (diff)
android: camera_metadata: Constify argument to addEntry() and updateEntry()
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@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Paul Elder <paul.elder@ideasonboard.com>
-rw-r--r--src/android/camera_metadata.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index 56df6f1c..f95c3458 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());
}