{"id":18596,"url":"https://patchwork.libcamera.org/api/patches/18596/?format=json","web_url":"https://patchwork.libcamera.org/patch/18596/","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":"<20230503122035.32026-12-naush@raspberrypi.com>","date":"2023-05-03T12:20:33","name":"[libcamera-devel,11/13] pipeline: raspberrypi: Make RPi::Stream::name() return const std::string &","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"c7f5c333ddf20681c02a3a3d4ff777c34d3f94ca","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18596/mbox/","series":[{"id":3863,"url":"https://patchwork.libcamera.org/api/series/3863/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3863","date":"2023-05-03T12:20:22","name":"Raspberry Pi: Code refactoring","version":1,"mbox":"https://patchwork.libcamera.org/series/3863/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18596/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18596/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 B0DB3C327C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 May 2023 12:21:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 63FB3633C1;\n\tWed,  3 May 2023 14:21:03 +0200 (CEST)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 089DE633B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 May 2023 14:21:02 +0200 (CEST)","by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-3f4000ec74aso2704705e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 03 May 2023 05:21:02 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tf23-20020a7bcd17000000b003ee443bf0c7sm1736785wmj.16.2023.05.03.05.21.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 03 May 2023 05:21:01 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1683116463;\n\tbh=EYQNuwD2CifocQLUwQCnqBa/mEuzQ8CwImJ7LOF8rE8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=TAo3JKoc+7GgvaTsB2FkNkroSDzpJsGoUJ/sUHzOd3MehBFPjk5Qt9JKCnezXA/pb\n\tG2W3y+Hsn2ecULicGWOeeH2F88Vsn1D+DRRH76BsqbWPZpcC4fNPWsOS97AczmzieL\n\t6pVWiepVs51z8sWIoChlk5P+dhG9qcv0q7E9kmClEYBngBjsmRt7uAchN3kACGh5yL\n\tEOkjIwrFa5gUb0ioLRG01fSg1dBLBSDOeXq0Ub0Tt3Rby4FcdhSwe8Fy4+dmaEXFmQ\n\tlgFKhWvcz5v4LkQSaRVrcHR+vaYKnOko0l9Ausg4f2Iq0k+/J6QRSfB6mlDMLn+X2w\n\toQoD9Tki1eyyw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1683116461; x=1685708461;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=85k+ztMhbF/aIzPrrW8kN62vFz/B1zNIYtS6xm//rbQ=;\n\tb=TW9d5Q3/MfK0h9AQvUe1SHgZFTL5tRfQnAffEjMoSs+2WqMLrfkrbSE78DPb0SlvNJ\n\t3yqh52cOwEqm869o0dbfv89FvEOglCKYamjnK3CTGhD1DcRomtNhKUbmLDmV6wExC5Vl\n\tf8DRfXq/dITBBChkAb4hdJLOIqb1N4Qo6kBKz1bHM0H6DZcUcMruk5REKO9VyXj3sjKr\n\txOWLRdIYJUW4vjtb//DJX9UoHsnO/xRFNH4F3YEqXDNi/7MGRYXr6yOHDboQ3S8SeIOj\n\tBb5DgPWVV0irqChtSpmxm/mFf7os4VENkTuD9zn4f8+PF8uE/Smjt1vIf37AStir3JKI\n\txiKQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"TW9d5Q3/\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1683116461; x=1685708461;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=85k+ztMhbF/aIzPrrW8kN62vFz/B1zNIYtS6xm//rbQ=;\n\tb=FWn5523TXe3WjMNXjU8sYguh64NL1nYdT/CtzmlN7saBKb8vfFefbzZavUf88dSIdL\n\tbyZUZGZDU5MLz+O9XeqQFMUxXE9tK6NPXps+lZxKCihg24CiWUtlSaFE4GPrkV9SmYUX\n\tviI8D3lUYL8vy2SSnLoPMsBIEGK2HwyzFCGdJQCvq+6ZnYxT95l3MvNLjMIWDXj97c82\n\t1+nY5pt2oC6oXDnufWvbUGKvatpk/421yd27di+8fdRA2oJ9SHHOslD/AdgAv/IQaPLf\n\togofqqRaIGJeBlp9v1yaTx3HJUBt9foB0MsLwo6Qwew8J6Rc4EZEUarO+X3KRnDISUyh\n\tsBbA==","X-Gm-Message-State":"AC+VfDxGn9YlBQdIYSkHvh59ZcmIZQEwnXGZQCl3u2W5anFkVxj7i3cQ\n\tPL9FHnpi7hfz1YgcJVdoIk5JPhHJqUwhFT7Jl8TFuA==","X-Google-Smtp-Source":"ACHHUZ7HDBBf75eHDttXB8yZFr7tRqeC2g06uK7g9CKGho6lz5qRz+k2+JvIO/jD5S2C7oVVZn5r/g==","X-Received":"by 2002:a05:600c:228f:b0:3f2:5999:4f3d with SMTP id\n\t15-20020a05600c228f00b003f259994f3dmr14269581wmf.29.1683116461407; \n\tWed, 03 May 2023 05:21:01 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  3 May 2023 13:20:33 +0100","Message-Id":"<20230503122035.32026-12-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20230503122035.32026-1-naush@raspberrypi.com>","References":"<20230503122035.32026-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 11/13] pipeline: raspberrypi: Make\n\tRPi::Stream::name() return const std::string &","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Return a const std::string reference from RPi::Stream::name() to avoid\ncopying a string when not needed.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/rpi_stream.cpp | 2 +-\n src/libcamera/pipeline/rpi/common/rpi_stream.h   | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\nindex 3690667e9aa6..b7e4130f5e56 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n@@ -19,7 +19,7 @@ V4L2VideoDevice *Stream::dev() const\n \treturn dev_.get();\n }\n \n-std::string Stream::name() const\n+const std::string &Stream::name() const\n {\n \treturn name_;\n }\ndiff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\nindex 1aae674967e1..b8c74de35863 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.h\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n@@ -49,7 +49,7 @@ public:\n \t}\n \n \tV4L2VideoDevice *dev() const;\n-\tstd::string name() const;\n+\tconst std::string &name() const;\n \tbool isImporter() const;\n \tvoid resetBuffers();\n \n","prefixes":["libcamera-devel","11/13"]}