[PATCH v2 2/5] libcamera: controls: Replace `numElements_` bit field
Barnabás Pőcze
barnabas.pocze at ideasonboard.com
Mon Apr 21 17:35:53 CEST 2025
Instead of using a 32-bit wide bit field of `std::size_t`, simply
use a `uint32_t` to store the number of elements. This makes it
possible to construct references, and use e.g. `std::swap()`.
Signed-off-by: Barnabás Pőcze <barnabas.pocze at ideasonboard.com>
---
include/libcamera/controls.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 1dc6ccffa..3f3580036 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -236,7 +236,7 @@ public:
private:
ControlType type_ : 8;
bool isArray_;
- std::size_t numElements_ : 32;
+ uint32_t numElements_;
union {
uint64_t internal;
void *external;
--
2.49.0
More information about the libcamera-devel
mailing list