[v1,0/2] libcamera: controls: String controls as `std::string_view`
mbox series

Message ID 20250422124751.30409-1-barnabas.pocze@ideasonboard.com
Headers show
Series
  • libcamera: controls: String controls as `std::string_view`
Related show

Message

Barnabás Pőcze April 22, 2025, 12:47 p.m. UTC
This change brings string controls in line with other controls in that
no non-trivial copies will be made when a value is retrieved from a
`ControlValue` instance.

https://bugs.libcamera.org/show_bug.cgi?id=256

Barnabás Pőcze (2):
  apps: cam: capture_script: Disallow arrays of strings
  libcamera: controls: Expose string controls as `std::string_view`

 include/libcamera/control_ids.h.in  |  1 +
 include/libcamera/controls.h        | 15 ++++++++-------
 src/apps/cam/capture_script.cpp     |  6 +-----
 src/apps/cam/main.cpp               |  2 +-
 src/apps/common/dng_writer.cpp      |  2 +-
 src/apps/qcam/cam_select_dialog.cpp |  6 +++---
 src/py/libcamera/py_helpers.cpp     |  4 ++--
 test/controls/control_value.cpp     |  4 ++--
 utils/codegen/controls.py           |  2 +-
 9 files changed, 20 insertions(+), 22 deletions(-)

--
2.49.0