libcamera/include
Christian Rauch 1c4d480185 libcamera: controls: Use std::optional to handle invalid control values
Previously, ControlList::get<T>() would use default constructed objects to
indicate that a ControlList does not have the requested Control. This has
several disadvantages: 1) It requires types to be default constructible,
2) it does not differentiate between a default constructed object and an
object that happens to have the same state as a default constructed object.

std::optional<T> additionally stores the information if the object is valid
or not, and therefore is more expressive than a default constructed object.

Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-07-19 14:21:54 +03:00
..
android android: Update Android headers 2021-05-31 19:26:59 +03:00
libcamera libcamera: controls: Use std::optional to handle invalid control values 2022-07-19 14:21:54 +03:00
linux include: linux: Add MEDIA_LNK_FL_ANCILLARY_LINK 2022-03-15 17:20:59 +00:00
meson.build libcamera: Fix base and ipa include dir 2021-09-28 20:09:39 +03:00