{"id":15629,"url":"https://patchwork.libcamera.org/api/patches/15629/?format=json","web_url":"https://patchwork.libcamera.org/patch/15629/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220406115301.4750-1-laurent.pinchart@ideasonboard.com>","date":"2022-04-06T11:53:01","name":"[libcamera-devel] libcamera: camera_sensor: Drop const on the return value of sizes()","commit_ref":"1a9587b8f2de010026784c251179a64105f1fc91","pull_url":null,"state":"accepted","archived":false,"hash":"0a2cfce885da4a1a406016f97dcfeb093e468095","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15629/mbox/","series":[{"id":3034,"url":"https://patchwork.libcamera.org/api/series/3034/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3034","date":"2022-04-06T11:53:01","name":"[libcamera-devel] libcamera: camera_sensor: Drop const on the return value of sizes()","version":1,"mbox":"https://patchwork.libcamera.org/series/3034/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15629/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15629/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6231BC3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Apr 2022 11:53:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1FB6E65648;\n\tWed,  6 Apr 2022 13:53:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B35046563F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 13:53:08 +0200 (CEST)","from pendragon.home (117.145-247-81.adsl-dyn.isp.belgacom.be\n\t[81.247.145.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 65036482\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 13:53:08 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649245990;\n\tbh=nboCIZ4bqEFzJt/MR2GurDSuJd+E1lL5DWvKn442HkI=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=biPAKltuvSx1XKZDU/yypNLttERsbSU/lXQp+sj4VcGzHSankQU7ho0GfzSLuxErj\n\t8UhvzcC2XY1RC/zbw3CX7MKwsVdv0yewM+wTUrdHl1qhQ8VK1DN8wh3/yuUkg+vm+K\n\tNh/G5FmhvDNdbFIf8uRRpP5qPiYA0qAPA/c3nukwQ6ViEoBIMiDDS85dpd6U/4123T\n\tM7GnP5Ki1+iGJO5hHBFkoecBUOQvX3Vw2kXJjnrImLogfKRhtpkMfrkO9UZGN+CoKK\n\tEOjynwQ6XCowCvJLI5zlbDFK+Nsd6TUTYmz/X54/xZotTvOjyTtiCvbRDyHbzb23W+\n\tnyrY0xRGDLrRQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649245988;\n\tbh=nboCIZ4bqEFzJt/MR2GurDSuJd+E1lL5DWvKn442HkI=;\n\th=From:To:Subject:Date:From;\n\tb=TgBI+oHk5KW0oS/WKfUgVNIfSz/iiNwMBtmW+smKcWOLPdOVfonLxxLVyRckWnuuy\n\tPDxvDUdbM8I6bQy5/ZK5LOT1lPT3sYFFNJArBqKJzuKKpQPqSyEgRe9OAda2XZLt1L\n\tT8/w83pbl7wqxLTysluR/Kz0epbuGrG5fe71tgo4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"TgBI+oHk\"; dkim-atps=neutral","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: camera_sensor: Drop const on\n\tthe return value of sizes()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The sizes() function returns a value, not a reference. There's no need\nfor it to be const.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/camera_sensor.h | 2 +-\n src/libcamera/camera_sensor.cpp            | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex 7fb4ededb4a4..b9f4d7867854 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -43,7 +43,7 @@ public:\n \tconst std::string &id() const { return id_; }\n \tconst MediaEntity *entity() const { return entity_; }\n \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n-\tconst std::vector<Size> sizes(unsigned int mbusCode) const;\n+\tstd::vector<Size> sizes(unsigned int mbusCode) const;\n \tSize resolution() const;\n \tconst std::vector<controls::draft::TestPatternModeEnum> &testPatternModes() const\n \t{\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 8b4406fe8aed..eaa2da6bad32 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -526,7 +526,7 @@ int CameraSensor::discoverAncillaryDevices()\n  *\n  * \\return The supported frame sizes for \\a mbusCode sorted in increasing order\n  */\n-const std::vector<Size> CameraSensor::sizes(unsigned int mbusCode) const\n+std::vector<Size> CameraSensor::sizes(unsigned int mbusCode) const\n {\n \tstd::vector<Size> sizes;\n \n","prefixes":["libcamera-devel"]}