[libcamera-devel] [PATCH 5/7] cam: Rename cameraName variable
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Aug 8 09:02:14 CEST 2020
Hi Niklas,
Thank you for the patch.
On Thu, Aug 06, 2020 at 03:09:35PM +0200, Niklas Söderlund wrote:
> When converting Camera::name() to Camera::id() one variable in cam was
> left unnoticed, rename it to cameraId.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/cam/main.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index fb7bcbd9c67ec672..cc3facd5a5b22092 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -95,13 +95,13 @@ int CamApp::init(int argc, char **argv)
> }
>
> if (options_.isSet(OptCamera)) {
> - const std::string &cameraName = options_[OptCamera];
> + const std::string &cameraId = options_[OptCamera];
> char *endptr;
> - unsigned long index = strtoul(cameraName.c_str(), &endptr, 10);
> + unsigned long index = strtoul(cameraId.c_str(), &endptr, 10);
> if (*endptr == '\0' && index > 0 && index <= cm_->cameras().size())
> camera_ = cm_->cameras()[index - 1];
> else
> - camera_ = cm_->get(cameraName);
> + camera_ = cm_->get(cameraId);
>
> if (!camera_) {
> std::cout << "Camera "
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list