mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Unicode: s/codepoint/code_point/g
Unicode calls them "code points" so let's follow their style.
This commit is contained in:
parent
b139fb9f38
commit
ea9ac3155d
45 changed files with 449 additions and 449 deletions
|
@ -59,16 +59,16 @@ void SuggestionManager::set_suggestions(Vector<CompletionSuggestion>&& suggestio
|
|||
if (m_suggestions.size() == 1) {
|
||||
m_largest_common_suggestion_prefix_length = m_suggestions[0].text_view.length();
|
||||
} else if (m_suggestions.size()) {
|
||||
u32 last_valid_suggestion_codepoint;
|
||||
u32 last_valid_suggestion_code_points;
|
||||
|
||||
for (;; ++common_suggestion_prefix) {
|
||||
if (m_suggestions[0].text_view.length() <= common_suggestion_prefix)
|
||||
goto no_more_commons;
|
||||
|
||||
last_valid_suggestion_codepoint = m_suggestions[0].text_view.codepoints()[common_suggestion_prefix];
|
||||
last_valid_suggestion_code_points = m_suggestions[0].text_view.code_pointss()[common_suggestion_prefix];
|
||||
|
||||
for (auto& suggestion : m_suggestions) {
|
||||
if (suggestion.text_view.length() <= common_suggestion_prefix || suggestion.text_view.codepoints()[common_suggestion_prefix] != last_valid_suggestion_codepoint) {
|
||||
if (suggestion.text_view.length() <= common_suggestion_prefix || suggestion.text_view.code_pointss()[common_suggestion_prefix] != last_valid_suggestion_code_points) {
|
||||
goto no_more_commons;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue