From 82c72efd557c126a877353e6d6d8ba355d3b6ba2 Mon Sep 17 00:00:00 2001 From: Jesse Rosenstock Date: Mon, 30 Jun 2025 08:36:09 -0700 Subject: [PATCH] kernels: Remove use of icu::UnicodeStringAppendable UnicodeStringAppendable is not needed. icu::UnicodeString can also be appended to. #Cleanup PiperOrigin-RevId: 777584340 --- .../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;