From 3decf2cb255e2718894ae5684eb6dc0207d1c13a Mon Sep 17 00:00:00 2001 From: Robin Leroy Date: Fri, 13 Dec 2024 11:29:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- icu4c/source/test/intltest/rbbitst.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/icu4c/source/test/intltest/rbbitst.cpp b/icu4c/source/test/intltest/rbbitst.cpp index a8beefae2f9e..1009bd4aecf9 100644 --- a/icu4c/source/test/intltest/rbbitst.cpp +++ b/icu4c/source/test/intltest/rbbitst.cpp @@ -1716,16 +1716,16 @@ class RemapRule : public SegmentationRule { // which has the same properties for all but line breaking, and the // same behaviour in line breaking (lb=SG and lb=XX are both treated // as lb=AL). - std::optional trailing_lead; + std::optional trailingLead; if (result.length() > 0 && U16_IS_LEAD(result[result.length() - 1])) { - trailing_lead = result.length() - 1; + trailingLead = result.length() - 1; } matcher->appendReplacement(result, replacement_, status); - if (trailing_lead && *trailing_lead + 1 < result.length() && - U16_IS_TRAIL(result[*trailing_lead + 1])) { - result.setCharAt(*trailing_lead, u'\uFFFF'); + if (trailingLead && *trailingLead + 1 < result.length() && + U16_IS_TRAIL(result[*trailingLead + 1])) { + result.setCharAt(*trailingLead, u'\uFFFF'); } if (matcher->start(status) + offset > 0 && @@ -1742,14 +1742,14 @@ class RemapRule : public SegmentationRule { *resolved[i].indexInRemapped += offset; } - std::optional trailing_lead; + std::optional trailingLead; if (result.length() > 0 && U16_IS_LEAD(result[result.length() - 1])) { - trailing_lead = result.length() - 1; + trailingLead = result.length() - 1; } matcher->appendTail(result); - if (trailing_lead && *trailing_lead + 1 < result.length() && - U16_IS_TRAIL(result[*trailing_lead + 1])) { - result.setCharAt(*trailing_lead, u'\uFFFF'); + if (trailingLead && *trailingLead + 1 < result.length() && + U16_IS_TRAIL(result[*trailingLead + 1])) { + result.setCharAt(*trailingLead, u'\uFFFF'); } if (resolved.back().indexInRemapped != result.length()) {