diff options
-rw-r--r-- | Userland/Applications/CharacterMap/CharacterSearchWidget.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/CharacterMap/SearchCharacters.h | 4 | ||||
-rw-r--r-- | Userland/Applications/CharacterMap/main.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp index 49f0ee13e7..db25ccc45f 100644 --- a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp +++ b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp @@ -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) }); }); } diff --git a/Userland/Applications/CharacterMap/SearchCharacters.h b/Userland/Applications/CharacterMap/SearchCharacters.h index ef5e76ee5c..a4350bd0cd 100644 --- a/Userland/Applications/CharacterMap/SearchCharacters.h +++ b/Userland/Applications/CharacterMap/SearchCharacters.h @@ -18,9 +18,9 @@ void for_each_character_containing(StringView query, Callback callback) // FIXME: There's probably a better way to do this than just looping, but it still only takes ~150ms to run for me! for (u32 code_point = 1; code_point <= maximum_code_point; ++code_point) { if (auto maybe_display_name = Unicode::code_point_display_name(code_point); maybe_display_name.has_value()) { - auto& display_name = maybe_display_name.value(); + auto display_name = maybe_display_name.release_value(); if (display_name.contains(uppercase_query_view, AK::CaseSensitivity::CaseSensitive)) - callback(code_point, display_name); + callback(code_point, move(display_name)); } } } diff --git a/Userland/Applications/CharacterMap/main.cpp b/Userland/Applications/CharacterMap/main.cpp index 62ae2727d9..d1a840394b 100644 --- a/Userland/Applications/CharacterMap/main.cpp +++ b/Userland/Applications/CharacterMap/main.cpp @@ -21,7 +21,7 @@ static void search_and_print_results(String const& query) { outln("Searching for '{}'", query); u32 result_count = 0; - 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); builder.append(" - "); |