Skip to content

Commit

Permalink
Remove use of g_utf8_substring
Browse files Browse the repository at this point in the history
Bug: 1406588
Change-Id: Iae03fce3d8332fdc5144b9b80a9ba146bf359693
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4201191
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Valerie Young <spectranaut@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1098756}
  • Loading branch information
spectranaut authored and Chromium LUCI CQ committed Jan 30, 2023
1 parent 5c67502 commit 2567d8e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,9 @@ void AXTreeFormatterAuraLinux::AddHypertextProperties(
gchar* link_start = g_utf8_offset_to_pointer(character_text, utf8_offset);
int offset = link_start - character_text;

gchar* character_substring =
g_utf8_substring(character_text, utf8_offset, utf8_offset + 1);
DCHECK(std::string(character_substring) == "\uFFFC");

base::ReplaceFirstSubstringAfterOffset(&text, offset, character_substring,
std::string replacement_char = "\uFFFC";
base::ReplaceFirstSubstringAfterOffset(&text, offset, replacement_char,
link_str);
g_free(character_substring);
}
}

Expand Down

0 comments on commit 2567d8e

Please sign in to comment.