From patchwork Thu Jan 30 07:47:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 22659 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9F91FBDB1C for ; Thu, 30 Jan 2025 07:47:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DC80068562; Thu, 30 Jan 2025 08:47:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="hOqpeqU7"; dkim-atps=neutral Received: from mail-10628.protonmail.ch (mail-10628.protonmail.ch [79.135.106.28]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 302806034B for ; Thu, 30 Jan 2025 08:47:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1738223240; x=1738482440; bh=zpP2GHJCFJ9x/J3BVlu4zLNIj1r+2vqu5/QNF89NN5E=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=hOqpeqU7lZVLiImRu8JcYtXBwshEu0BzdL53GlA/AnQbjTUF++s/EoAFXC2K3Sea+ L31z/ZqnFLtoaGQYlz49D/oOtJfWSQj93+eynt/HNqvBEk4tZT3OtbfiHRDkzeF6fi SE5sq0Q65m+VZI+9+9x/nowikI3jwjS8Yrh1KWDYRJN7t6iRxhHjDS1Gua3O0BEggo QtU0uXP2MLGk/XXT14KrrDoJ8wl9Wl8E7FRGtPAEpSfReLumHsZ3VijTTgwdhrOP+S PapgFeGuWXabH5OcRyEhSCALBvW8OffEbzG6FFMu14VdTH6VRNAPWYGOfqpSFaqFvV zw8UbLgaSc1kw== Date: Thu, 30 Jan 2025 07:47:15 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v1] Documentation: guides: application-developer: Fix variable shadowing Message-ID: <20250130074712.959046-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 0050fef5813c7120335ffbb59494ea6cebaeb50d MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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