{"id":22171,"url":"https://patchwork.libcamera.org/api/1.1/patches/22171/?format=json","web_url":"https://patchwork.libcamera.org/patch/22171/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20241205092258.1058077-2-pobrn@protonmail.com>","date":"2024-12-05T09:23:06","name":"[v2,2/2] libcamera: utils: StringSplitter: Add `operator==`","commit_ref":"737fb452fc3bb8a8513ddbf527f4836b9d32d2a5","pull_url":null,"state":"accepted","archived":false,"hash":"aee84820822ed9442ddcb6eac4cd5845387d773c","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/1.1/people/133/?format=json","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22171/mbox/","series":[{"id":4848,"url":"https://patchwork.libcamera.org/api/1.1/series/4848/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4848","date":"2024-12-05T09:23:00","name":"[v2,1/2] libcamera: utils: StringSplitter: Inline some trivial methods","version":2,"mbox":"https://patchwork.libcamera.org/series/4848/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22171/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22171/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 B9B79BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Dec 2024 09:23:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 602A5660EB;\n\tThu,  5 Dec 2024 10:23:13 +0100 (CET)","from mail-40133.protonmail.ch (mail-40133.protonmail.ch\n\t[185.70.40.133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D598660E1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Dec 2024 10:23:11 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"pXoZhVnP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1733390590; x=1733649790;\n\tbh=Px5dd2eghGhMD9W1LLrCTb99FJrWCLoaaIMWnZx3ty8=;\n\th=Date:To:From:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;\n\tb=pXoZhVnPv6d1loI3EeHcKu7jbQS5ntHAwlAG4bXfjbv77qqtcGRNgJ4uzYpvdtXQ2\n\tgRz+1N7xgwwWA6nFD4gSuCjuW9BgbuvPhgVLLkdZhk+J6Qf4gYr9kmCBpmKUBu24CC\n\ta6ZicXDPieLG+nII5dTYHSiL53T/YtQO3IBDk0sOhTFYztpgHX2XmJKpyENeFxlPPi\n\tqgj20CU5g0rh69EGLhMQ8/J4r+0mVEPdULdG1BezOITJ1nRNCAl5fyI6bELsPmQk5w\n\t9UqM0terX189f8gmvbGPC8SmqLSeK/Yk5JEmFlTvxnK8I66QMUfzB/OuFPPEi2AEfb\n\tksn+hA8wcO7yA==","Date":"Thu, 05 Dec 2024 09:23:06 +0000","To":"libcamera-devel@lists.libcamera.org","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Subject":"[PATCH v2 2/2] libcamera: utils: StringSplitter: Add `operator==`","Message-ID":"<20241205092258.1058077-2-pobrn@protonmail.com>","In-Reply-To":"<20241205092258.1058077-1-pobrn@protonmail.com>","References":"<20241205092258.1058077-1-pobrn@protonmail.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"b58a1e8768925a6c5800ad83c039c7c2b273f3dd","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"If `cpp_debugstl` is enabled in the build configuration, then\nlibstdc++ will try to use `==` on operators in certain cases\nto carry out extra checks. This leads to build failures because\n`StringSplitter::iterator` has no `operator==`.\n\nImplement `operator==`, and express `operator!=` in terms of it.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n---\n include/libcamera/base/utils.h | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)","diff":"diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h\nindex c4a06660..780aeda6 100644\n--- a/include/libcamera/base/utils.h\n+++ b/include/libcamera/base/utils.h\n@@ -205,9 +205,14 @@ public:\n \t\titerator &operator++();\n \t\tstd::string operator*() const;\n \n+\t\tbool operator==(const iterator &other) const\n+\t\t{\n+\t\t\treturn pos_ == other.pos_;\n+\t\t}\n+\n \t\tbool operator!=(const iterator &other) const\n \t\t{\n-\t\t\treturn pos_ != other.pos_;\n+\t\t\treturn !(*this == other);\n \t\t}\n \n \tprivate:\n","prefixes":["v2","2/2"]}