From ad9735405d014ed0aea07e841076a7bcd21fc985 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Tue, 1 Jul 2025 13:31:36 -0700 Subject: [PATCH] kernels: Remove use of icu::UnicodeStringAppendable UnicodeStringAppendable is not needed. icu::UnicodeString can also be appended to. PiperOrigin-RevId: 778169345 --- .../core/kernels/whitespace_tokenizer_config_builder.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc index 6e79c2573..1dfd0a2b4 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc @@ -17,7 +17,6 @@ #include #include -#include "icu4c/source/common/unicode/appendable.h" #include "icu4c/source/common/unicode/bytestream.h" #include "icu4c/source/common/unicode/edits.h" #include "icu4c/source/common/unicode/normalizer2.h" @@ -40,11 +39,10 @@ namespace text { std::string BuildWhitespaceString() { icu::UnicodeString unicode_string; - icu::UnicodeStringAppendable appendable_unicode_string(unicode_string); // The maximum codepoint in Unicode is 0x0010FFFF. for (UChar32 cp = 0; cp <= 0x0010FFFF; ++cp) { if (U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp)) { - appendable_unicode_string.appendCodePoint(cp); + unicode_string.append(cp); } } std::string str;