From patchwork Mon Feb 3 10:43:24 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: 22723 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 AA8BAC3260 for ; Mon, 3 Feb 2025 10:43:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 74AA868588; Mon, 3 Feb 2025 11:43:31 +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="M5CYYgX/"; dkim-atps=neutral Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F6036857A for ; Mon, 3 Feb 2025 11:43:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1738579410; x=1738838610; bh=1R1BISHVdqErcyRJD1onzerDZ+4cX2jP6Z5GP/xx5qc=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=M5CYYgX/JJWK2DYIj2l7La0gGcSJCJp1jWPX4Wfhba+o5y4cPbDaVLMRiCF+LhFgL FDLSCwFf8jVeItp4bRR5dbz0obgZqwfh1QmoVMA0nUAzFBZEirrzqZtXf4iuWzFrh1 hXBXr2k8t8JgXVXQW3EZExoyJeDoetnlT4+X6pDFVjrW1liox0xOuyY0MXK8h0nhPI pgmgh5/73IQelJxbkUUXh25cyT5YqgX40ik6oSOR7hf9sD0flph+UGmnoeMb0bTG7h rzw4sVHd/GQ14nttdSld2F7LGs2i7UtpAUxgn59i+bqbxE7OL4SFozV8WzEBBqm9jI KPv1ZNOvchd8g== Date: Mon, 03 Feb 2025 10:43:24 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v1 1/3] libcamera: pipeline: virtual: Simplify error return Message-ID: <20250203104318.135628-2-pobrn@protonmail.com> In-Reply-To: <20250203104318.135628-1-pobrn@protonmail.com> References: <20250203104318.135628-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 7ad9abafa74da0594e7c9b957f38305ebdf0f529 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" Just return an `std::unique_ptr` constructed from an empty initializer instead of doing a `reset()` on the existing `config` variable and returning that. This is simpler. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/virtual/virtual.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/virtual/virtual.cpp b/src/libcamera/pipeline/virtual/virtual.cpp index fc46653f6..94c2bd91e 100644 --- a/src/libcamera/pipeline/virtual/virtual.cpp +++ b/src/libcamera/pipeline/virtual/virtual.cpp @@ -232,8 +232,7 @@ PipelineHandlerVirtual::generateConfiguration(Camera *camera, default: LOG(Virtual, Error) << "Requested stream role not supported: " << role; - config.reset(); - return config; + return {}; } std::map> streamFormats;