mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 18:44:27 +03:00
Assistant: Replace usages of adopt_ref() with make_ref_counted()
Let's be consistent with how we construct Result objects.
This commit is contained in:
parent
493fc65e42
commit
e144b477bd
Notes:
sideshowbarker
2024-07-17 05:03:11 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/e144b477bd Pull-request: https://github.com/SerenityOS/serenity/pull/18331 Reviewed-by: https://github.com/LucasChollet Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/linusg
@ -117,7 +117,7 @@ void CalculatorProvider::query(DeprecatedString const& query, Function<void(Vect
|
||||
}
|
||||
|
||||
Vector<NonnullRefPtr<Result>> results;
|
||||
results.append(adopt_ref(*new CalculatorResult(calculation)));
|
||||
results.append(make_ref_counted<CalculatorResult>(calculation));
|
||||
on_complete(move(results));
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ void TerminalProvider::query(DeprecatedString const& query, Function<void(Vector
|
||||
auto command = query.substring(1).trim_whitespace();
|
||||
|
||||
Vector<NonnullRefPtr<Result>> results;
|
||||
results.append(adopt_ref(*new TerminalResult(move(command))));
|
||||
results.append(make_ref_counted<TerminalResult>(move(command)));
|
||||
on_complete(move(results));
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ void URLProvider::query(DeprecatedString const& query, Function<void(Vector<Nonn
|
||||
return;
|
||||
|
||||
Vector<NonnullRefPtr<Result>> results;
|
||||
results.append(adopt_ref(*new URLResult(url)));
|
||||
results.append(make_ref_counted<URLResult>(url));
|
||||
on_complete(results);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user