summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-07-05 19:55:47 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-08-02 18:07:22 +0900
commitc9e1f75791575aa1a7a1e84531432ba9fbe42ceb (patch)
treee97d6082e192052ac8770a454bab8d8898713a07
parent24f80f14af50872c2294bce96da97492ca41f72f (diff)
android: metadata: Fix addEntry template type
Since we set entries with android tags directly, which are enums and not arithmetic types, the addEntry template fails to match. Fix this by also allowing enum values in addEntry. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/android/camera_metadata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index 03b3e701..60be416c 100644
--- a/src/android/camera_metadata.h
+++ b/src/android/camera_metadata.h
@@ -34,7 +34,8 @@ public:
bool hasEntry(uint32_t tag) const;
template<typename T,
- std::enable_if_t<std::is_arithmetic_v<T>> * = nullptr>
+ std::enable_if_t<std::is_arithmetic_v<T> ||
+ std::is_enum_v<T>> * = nullptr>
bool addEntry(uint32_t tag, const T &data)
{
return addEntry(tag, &data, 1, sizeof(T));