mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
CharacterMap: Move display name strings into the search results object
Now that we're passing the display name directly to the search results structure, let's move() the string instead of copying it.
This commit is contained in:
parent
54d89401df
commit
bd5662d6f2
3 changed files with 5 additions and 5 deletions
|
@ -85,10 +85,10 @@ void CharacterSearchWidget::search()
|
|||
auto query = m_search_input->text();
|
||||
if (query.is_empty())
|
||||
return;
|
||||
for_each_character_containing(query, [&](auto code_point, auto& display_name) {
|
||||
for_each_character_containing(query, [&](auto code_point, auto display_name) {
|
||||
StringBuilder builder;
|
||||
builder.append_code_point(code_point);
|
||||
|
||||
model.add_result({ code_point, builder.build(), display_name });
|
||||
model.add_result({ code_point, builder.build(), move(display_name) });
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue