[v4,3/4] libcamera: controls: Add missing size to control_type<Point>
diff mbox series

Message ID 20241018160638.936993-4-stefan.klug@ideasonboard.com
State Accepted
Commit ed3f3f6aa6f2dded584e1b3d3f97e8bceea1b2cd
Headers show
Series
  • A few small fixes
Related show

Commit Message

Stefan Klug Oct. 18, 2024, 4:06 p.m. UTC
The size member is missing in control_type<Point>. This did not do any
harm because the only control using the Point type was an array control.
As soon as a control-id with a non-array Point control gets defined, the
compile fails with:

error: size is not a member of libcamera::details::control_type<libcamera::Point>

Fixes: 200d535ca85f ("libcamera: controls: Add ControlTypePoint")
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

---
Changes in v2:
- Describe the error in commit message
- Collected tags
---
 include/libcamera/controls.h | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index ca60bbacad17..28fec767fae1 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -101,6 +101,7 @@  struct control_type<Size> {
 template<>
 struct control_type<Point> {
 	static constexpr ControlType value = ControlTypePoint;
+	static constexpr std::size_t size = 0;
 };
 
 template<typename T, std::size_t N>