Patch Detail
Show a patch.
GET /api/1.1/patches/4004/?format=api
{ "id": 4004, "url": "https://patchwork.libcamera.org/api/1.1/patches/4004/?format=api", "web_url": "https://patchwork.libcamera.org/patch/4004/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200609211110.13440-1-laurent.pinchart@ideasonboard.com>", "date": "2020-06-09T21:11:10", "name": "[libcamera-devel] android: camera_device: Use std::make_tuple()", "commit_ref": "7a88b212e0107299b277dae8657476bc8d5d2b0f", "pull_url": null, "state": "accepted", "archived": false, "hash": "dd4dab4d174d930453cce006562b30696ac9a879", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/4004/mbox/", "series": [ { "id": 981, "url": "https://patchwork.libcamera.org/api/1.1/series/981/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=981", "date": "2020-06-09T21:11:10", "name": "[libcamera-devel] android: camera_device: Use std::make_tuple()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/981/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/4004/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/4004/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 70BD6600F7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 9 Jun 2020 23:11:34 +0200 (CEST)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E3643291\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 9 Jun 2020 23:11:33 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"f3ZuRrfs\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1591737094;\n\tbh=maHI8NY0yGFsKaa5uwtC69vV2/haeoqNj3sf+VEM2Tk=;\n\th=From:To:Subject:Date:From;\n\tb=f3ZuRrfsa74yPoNQcPNda1JUCFbZNVpqYgQwWexLD+RD28yNWmZksloJHQgCVtBd/\n\tx5DgnkTkhYzU7JtwwgTD9hdwH6PLaKuntldepwY5uSo2F87CuTtw6JNzVRpRplH0Yp\n\t5Zzf3PkqIzP7B1h274f01ceZfGuTb1Z3jsSHvFas=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 10 Jun 2020 00:11:10 +0300", "Message-Id": "<20200609211110.13440-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] android: camera_device: Use\n\tstd::make_tuple()", "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>", "X-List-Received-Date": "Tue, 09 Jun 2020 21:11:34 -0000" }, "content": "Until N4387 (https://wg21.link/N4387, applied as a defect report for\nC++11), a function could not return a tuple using\ncopy-list-initialization. This affects gcc-5 that was released before\nN4387 was integrated, and causes a compilation error:\n\n../../src/android/camera_device.cpp: In member function ‘std::tuple<unsigned int, unsigned int> CameraDevice::calculateStaticMetadataSize()’:\n../../src/android/camera_device.cpp:391:32: error: converting to ‘std::tuple<unsigned int, unsigned int>’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = unsigned int&; _U2 = unsigned int&; <template-parameter-2-3> = void; _T1 = unsigned int; _T2 = unsigned int]’\n return { numEntries, byteSize };\n\nFix it by using std::make_tuple().\n\nFixes: a80d38109f65 (\"android: camera_device: Calculate metadata size\")\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 7a0dc530e35b..c56e2355f778 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -388,7 +388,7 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()\n \t */\n \tbyteSize += streamConfigurations_.size() * 52;\n \n-\treturn { numEntries, byteSize };\n+\treturn std::make_tuple(numEntries, byteSize);\n }\n \n /*\n", "prefixes": [ "libcamera-devel" ] }