From patchwork Sat Oct 12 18:43:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2162 Return-Path: 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 3AE9061563 for ; Sat, 12 Oct 2019 20:44:15 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 84F0D54C for ; Sat, 12 Oct 2019 20:44:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1570905854; bh=rUJFRV8cl37hkAEqYF6hFVVdtfsUwULZC17nOZieKxQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hb8yOGkRrwmsXAgxX1JixPwGVK6PFiyiG+hOVEvA4GlsPD6Ivm40FwX9owJZNgJpv 5KezhTjavyAJHSb7IP5KQngy/jDj+Sj4OuchYn0f2n9dgOZvzvAgykmeCpadI2CVPU 3A3+MOulwXM98WR4pdmb1zB4+O3jg1yVE77mWpyM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 12 Oct 2019 21:43:54 +0300 Message-Id: <20191012184407.31684-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191012184407.31684-1-laurent.pinchart@ideasonboard.com> References: <20191012184407.31684-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 01/14] libcamera: pipeline: rkisp1: Avoid copy assignment of V4L2 control map 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: , X-List-Received-Date: Sat, 12 Oct 2019 18:44:15 -0000 Use the std::map::emplace() method to avoid unnecessary creation of an empty V4L2ControlInfoMap folled by a copy assignment. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 029d5868d11f..32b023730009 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -777,7 +777,7 @@ int PipelineHandlerRkISP1::start(Camera *camera) }; std::map entityControls; - entityControls[0] = data->sensor_->controls(); + entityControls.emplace(0, data->sensor_->controls()); data->ipa_->configure(streamConfig, entityControls);