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>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user