diff options
author | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-03-31 16:22:47 +0200 |
---|---|---|
committer | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-04-01 12:08:24 +0200 |
commit | 37283b68eacbcb0a234c1bd21eedaa22323240b8 (patch) | |
tree | 2a6d2f829533377bdb7c2a7c3a14d1ee0b380bd2 /src/py | |
parent | 056ebf0b6e511958087470812b1f629fcc44dd70 (diff) |
libcamera: camera_manager: Take camera id in `std::string_view`
Do not force the caller to have an `std::string` object as a
simple string view is sufficient to do the lookup.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/py')
-rw-r--r-- | src/py/libcamera/py_camera_manager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/py/libcamera/py_camera_manager.h b/src/py/libcamera/py_camera_manager.h index 3574db23..af69b915 100644 --- a/src/py/libcamera/py_camera_manager.h +++ b/src/py/libcamera/py_camera_manager.h @@ -20,7 +20,7 @@ public: ~PyCameraManager(); pybind11::list cameras(); - std::shared_ptr<Camera> get(const std::string &name) { return cameraManager_->get(name); } + std::shared_ptr<Camera> get(std::string_view name) { return cameraManager_->get(name); } static const std::string &version() { return CameraManager::version(); } |