1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

Assistant: Avoid an unnecessary copy of the results list

This commit is contained in:
Tim Ledbetter 2023-09-28 07:05:51 +01:00 committed by Jelle Raaijmakers
parent 55f4d468ad
commit c087ba24b9

View file

@ -84,7 +84,7 @@ public:
{
}
Function<void(Vector<NonnullRefPtr<Result const>>)> on_new_results;
Function<void(Vector<NonnullRefPtr<Result const>>&&)> on_new_results;
void search(DeprecatedString const& query)
{
@ -131,7 +131,7 @@ private:
return a->score() > b->score();
});
on_new_results(all_results);
on_new_results(move(all_results));
}
AppState& m_state;