[PATCH v1] Documentation: guides: application-developer: Fix variable shadowing
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Jan 30 15:55:31 CET 2025
Hi Barnabás,
Thank you for the patch.
On Thu, Jan 30, 2025 at 07:47:15AM +0000, Barnabás Pőcze wrote:
> The mentioned commit mistakenly introduced a new variable for storing
> the camera instead of just assigining to the global variable defined
> earlier in the tutorial. Fix that by making it an assignment.
>
> Bug: https://bugs.libcamera.org/show_bug.cgi?id=252
> Fixes: e77a2751100e38 ("treewide: Query list of cameras just once")
> Signed-off-by: Barnabás Pőcze <pobrn at protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> Documentation/guides/application-developer.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
> index 67f5bd7e7..297586a1c 100644
> --- a/Documentation/guides/application-developer.rst
> +++ b/Documentation/guides/application-developer.rst
> @@ -128,7 +128,7 @@ available.
>
> std::string cameraId = cameras[0]->id();
>
> - auto camera = cm->get(cameraId);
> + camera = cm->get(cameraId);
> /*
> * Note that `camera` may not compare equal to `cameras[0]`.
> * In fact, it might simply be a `nullptr`, as the particular
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list