[PATCH 0/2] libcamera: Add utils::to_underlying() helper
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Mon Feb 26 15:25:05 CET 2024
Hi Laurent
for the series
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
On Sun, Feb 25, 2024 at 06:43:45PM +0200, Laurent Pinchart wrote:
> Hello,
>
> C++23 has a std::to_underlying() helper that casts an enumeration to its
> underlying type. libcamera open-codes this in multiple places. This
> series adds an identical helper to the utils:: namespace, and uses it to
> replace the open-coded implementations.
>
> Laurent Pinchart (2):
> libcamera: utils: Add to_underlying() helper function
> libcamera: Use utils::to_underlying()
>
> include/libcamera/base/utils.h | 6 ++++++
> src/ipa/rpi/controller/rpi/sdn.cpp | 3 ++-
> src/libcamera/base/utils.cpp | 10 ++++++++++
> src/libcamera/pipeline/rpi/common/rpi_stream.h | 10 +++-------
> src/libcamera/stream.cpp | 2 +-
> 5 files changed, 22 insertions(+), 9 deletions(-)
>
>
> base-commit: 059bbcdc34e7d887ee02fdd47613bd6e0eb70d16
> --
> Regards,
>
> Laurent Pinchart
>
More information about the libcamera-devel
mailing list