From patchwork Mon Nov 3 14:00:49 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: 24949 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 B675DC3241 for ; Mon, 3 Nov 2025 14:00:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D4F0A609D8; Mon, 3 Nov 2025 15:00:55 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QhMsLVg1"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 841AA606A0 for ; Mon, 3 Nov 2025 15:00:53 +0100 (CET) Received: from pb-laptop.local (185.221.140.239.nat.pool.zt.hu [185.221.140.239]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D4D9C73 for ; Mon, 3 Nov 2025 14:59:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1762178340; bh=nvpUT0NDmY4BcKpZ/eMdTgebnBm7OcYqpunHEipWxtA=; h=From:To:Subject:Date:From; b=QhMsLVg1a0J2g5OzAzCWU55I+MqCAEo0e6xZ0/f3K21ZmHooAd1Ob0qNzICk0UfMn xQLuUb3UDXi+Ki5jnsHxhRmDzXJD1WcwYhkuAISF+n1csE6chTPiuLENhbrNWxxR9z +CzlWAZx12FqxfTV/tWaYY1CCP5/dGKNiVHHE7yE= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1] ipa: libipa: agc_mean_luminance: Avoid unnecessary copies Date: Mon, 3 Nov 2025 15:00:49 +0100 Message-ID: <20251103140049.413881-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.2 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" `constraintModes()` and `exposureModeHelpers()` need not return copies of the internal objects, exposing const references is sufficient, so do that. Reviewed-by: Barnabás Pőcze Reviewed-by: Daniel Scally Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- src/ipa/libipa/agc_mean_luminance.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h index d7ec548e3e..e5f164c318 100644 --- a/src/ipa/libipa/agc_mean_luminance.h +++ b/src/ipa/libipa/agc_mean_luminance.h @@ -53,12 +53,12 @@ public: void setLimits(utils::Duration minExposureTime, utils::Duration maxExposureTime, double minGain, double maxGain, std::vector constraints); - std::map> constraintModes() + const std::map> &constraintModes() const { return constraintModes_; } - std::map> exposureModeHelpers() + const std::map> &exposureModeHelpers() const { return exposureModeHelpers_; }