[libcamera-devel] [PATCH 1/4] android: camera_metadata: Rename sizeofT argument to elementSize
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat May 15 20:38:23 CEST 2021
The sizeofT argument to CameraMetadata::addEntry() stores the size of
one element. Its name is a bit cryptic as the function isn't a template
function with a typename T. Rename it to elementSize.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/android/camera_metadata.cpp | 4 ++--
src/android/camera_metadata.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
index bf8d2781cc21..59366c50cc16 100644
--- a/src/android/camera_metadata.cpp
+++ b/src/android/camera_metadata.cpp
@@ -110,12 +110,12 @@ bool CameraMetadata::resize(size_t count, size_t size)
}
bool CameraMetadata::addEntry(uint32_t tag, const void *data, size_t count,
- size_t sizeofT)
+ size_t elementSize)
{
if (!valid_)
return false;
- if (!resize(1, count * sizeofT)) {
+ if (!resize(1, count * elementSize)) {
LOG(CameraMetadata, Error) << "Failed to resize";
valid_ = false;
return false;
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index 07afd4b25ae7..56df6f1c9008 100644
--- a/src/android/camera_metadata.h
+++ b/src/android/camera_metadata.h
@@ -72,7 +72,8 @@ public:
return updateEntry(tag, data.data(), data.size());
}
- bool addEntry(uint32_t tag, const void *data, size_t count, size_t sizeofT);
+ bool addEntry(uint32_t tag, const void *data, size_t count,
+ size_t elementSize);
bool updateEntry(uint32_t tag, const void *data, size_t count);
camera_metadata_t *get();
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list