Patch Detail
Show a patch.
GET /api/patches/18558/?format=api
{ "id": 18558, "url": "https://patchwork.libcamera.org/api/patches/18558/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18558/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230426131057.21550-11-naush@raspberrypi.com>", "date": "2023-04-26T13:10:54", "name": "[libcamera-devel,10/13] pipeline: raspberrypi: Make RPi::Stream::name() return const std::string &", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c7f5c333ddf20681c02a3a3d4ff777c34d3f94ca", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18558/mbox/", "series": [ { "id": 3847, "url": "https://patchwork.libcamera.org/api/series/3847/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3847", "date": "2023-04-26T13:10:44", "name": "Raspberry Pi: Code refactoring", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3847/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18558/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18558/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 63A6DBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Apr 2023 13:13:41 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12529627E6;\n\tWed, 26 Apr 2023 15:13:41 +0200 (CEST)", "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 727B4627DF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Apr 2023 15:13:39 +0200 (CEST)", "by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-3f18dacd392so43721615e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Apr 2023 06:13:39 -0700 (PDT)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tk5-20020adff5c5000000b002f103ca90cdsm15780949wrp.101.2023.04.26.06.13.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Apr 2023 06:13:38 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682514821;\n\tbh=/mODpDy9ae6RAbY4u8qElAFie9GlwGqlL9wtGupX6Us=;\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:\n\tFrom;\n\tb=IM9Olix67s21n1eZqelrOLRRuQsbCBHqQ4oVC5JsoU76D0QPVdijOhKYXBaLLcCPE\n\thau+ZCtR6CiLYxIOmvLxkbff3sSdQ+u3qxI/zpmXnuKGwbnX32TrwcUZjtBsvw1Hwk\n\ty1XUX/a/8HjVBnXJU8shffF5MZYkGUpgN0iwjhqVEzxek82x6ZiwFqDM3oVsHvr9RG\n\tYLu2vfQfVfqZw6VccscSQ8TIcv2zqK9A3TPRQ8usigO3GbILad4SbmjoY4SqK+uQ0o\n\tb6d0TMGTu3ildj1PV8yPVRiJfPKE10XIex7Q/hqCyyhn9wBHlWhmhaMN9Igloyh8gw\n\t9f80mZEwPa4bw==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682514819; x=1685106819;\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=IZJohyqvcH9rNGAHJTnrio/fvnwZIvDrGoCaJPfxj3g=;\n\tb=qyZkMlZcl/xYEQvAub/rBoLtlvrSkaMmM9xCs3kMC9HUU+gFHT76nufxAo4ioq25JB\n\tiKa2xquzLGUTRqmxwh+rqTLsFXqvrlKQ3cjJgDIqwY52wM4BfUBiNfEAXiRFifYxztw4\n\tCntK9cK8+E6N7VpvtoTOxDtg0shUHaLGh8Ur/+0iUOgf1tr0RVm2RZazBmDh9N7mQlWI\n\tp07NrCiLfzzXzWWQ5RhpnZvFxd/i34oPdEa9UFegM/GiCzGv8zD7IBTfWXmrVBEdfWot\n\tLlTf/aF/XHDGBqTLoun2pdQIiLnKUUyVd8iulSw2zoA2RC2qyH49D4DLw7ZRZ5qtsNEv\n\tRC/g==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qyZkMlZc\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682514819; x=1685106819;\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=IZJohyqvcH9rNGAHJTnrio/fvnwZIvDrGoCaJPfxj3g=;\n\tb=NAq1awCrveQRFo1T6D6+9HZre/k/FLuL0j/yk3wa3qZeTgYn7DYozX/8SDoo2EpTZb\n\t4osY21zgqtHdrU/adlNa4Ap8RKZOrA001qqQK8F+6tw9YE01MoplR81PpKZ8y0OnTtei\n\ttnQsayKHDAHeU2ycmqKYaxSpYNCyI7F0jU4P+bMvwG7sKvcDiTZom2/fp6hsFC9VKi0G\n\tODFsy5oE401BTF8Fd1N1Crfmh0aPNYiYMiRWzFq50dUxfQUrn8yzyO7Gq+GMfFbefB4R\n\tsr/+LcEXAeDpfCui9X43St1VSvn8RL4neCoCkYS2/wkJ3CN1q4k9GcQ5I7wtNzRYO3xP\n\tLMcQ==", "X-Gm-Message-State": "AAQBX9dJSLzc0Pa4GNes0QDK8Ga6MziOVMef+9OxW1fi2Ib9bIOXB41K\n\t+3S+pDl3KyZ7wgdbiSX6XXHUrHh2Ccqmv9TpPf6Xug==", "X-Google-Smtp-Source": "AKy350aWwzMDRShhF4qDn5LI6nqJQvKIXS7AdvGQ2d31qFYGyS7kCLS8ktoKgRjbAT7igap/BdFB8g==", "X-Received": "by 2002:a05:600c:219a:b0:3f1:8c37:fa79 with SMTP id\n\te26-20020a05600c219a00b003f18c37fa79mr12753615wme.31.1682514818844; \n\tWed, 26 Apr 2023 06:13:38 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 26 Apr 2023 14:10:54 +0100", "Message-Id": "<20230426131057.21550-11-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230426131057.21550-1-naush@raspberrypi.com>", "References": "<20230426131057.21550-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 10/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>", "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---\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", "10/13" ] }