Message ID | 20240225164348.10073-1-laurent.pinchart@ideasonboard.com |
---|---|
Headers | show |
Series |
|
Related | show |
Hi Laurent for the series Reviewed-by: Jacopo Mondi <jacopo.mondi@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 >
Hi Laurent, Thanks for the fix. For both patches: Reviewed-by: Naushir Patuck <naush@raspberrypi.com> On Sun, 25 Feb 2024 at 16:43, Laurent Pinchart <laurent.pinchart@ideasonboard.com> 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 >