From patchwork Wed Apr 6 11:53:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15629 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 6231BC3256 for ; Wed, 6 Apr 2022 11:53:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1FB6E65648; Wed, 6 Apr 2022 13:53:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649245990; bh=nboCIZ4bqEFzJt/MR2GurDSuJd+E1lL5DWvKn442HkI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=biPAKltuvSx1XKZDU/yypNLttERsbSU/lXQp+sj4VcGzHSankQU7ho0GfzSLuxErj 8UhvzcC2XY1RC/zbw3CX7MKwsVdv0yewM+wTUrdHl1qhQ8VK1DN8wh3/yuUkg+vm+K Nh/G5FmhvDNdbFIf8uRRpP5qPiYA0qAPA/c3nukwQ6ViEoBIMiDDS85dpd6U/4123T M7GnP5Ki1+iGJO5hHBFkoecBUOQvX3Vw2kXJjnrImLogfKRhtpkMfrkO9UZGN+CoKK EOjynwQ6XCowCvJLI5zlbDFK+Nsd6TUTYmz/X54/xZotTvOjyTtiCvbRDyHbzb23W+ nyrY0xRGDLrRQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B35046563F for ; Wed, 6 Apr 2022 13:53:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TgBI+oHk"; dkim-atps=neutral Received: from pendragon.home (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 65036482 for ; Wed, 6 Apr 2022 13:53:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1649245988; bh=nboCIZ4bqEFzJt/MR2GurDSuJd+E1lL5DWvKn442HkI=; h=From:To:Subject:Date:From; b=TgBI+oHk5KW0oS/WKfUgVNIfSz/iiNwMBtmW+smKcWOLPdOVfonLxxLVyRckWnuuy PDxvDUdbM8I6bQy5/ZK5LOT1lPT3sYFFNJArBqKJzuKKpQPqSyEgRe9OAda2XZLt1L T8/w83pbl7wqxLTysluR/Kz0epbuGrG5fe71tgo4= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Apr 2022 14:53:01 +0300 Message-Id: <20220406115301.4750-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: camera_sensor: Drop const on the return value of sizes() 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-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The sizes() function returns a value, not a reference. There's no need for it to be const. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- include/libcamera/internal/camera_sensor.h | 2 +- src/libcamera/camera_sensor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index 7fb4ededb4a4..b9f4d7867854 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -43,7 +43,7 @@ public: const std::string &id() const { return id_; } const MediaEntity *entity() const { return entity_; } const std::vector &mbusCodes() const { return mbusCodes_; } - const std::vector sizes(unsigned int mbusCode) const; + std::vector sizes(unsigned int mbusCode) const; Size resolution() const; const std::vector &testPatternModes() const { diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 8b4406fe8aed..eaa2da6bad32 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -526,7 +526,7 @@ int CameraSensor::discoverAncillaryDevices() * * \return The supported frame sizes for \a mbusCode sorted in increasing order */ -const std::vector CameraSensor::sizes(unsigned int mbusCode) const +std::vector CameraSensor::sizes(unsigned int mbusCode) const { std::vector sizes;