summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Ledbetter <timledbetter@gmail.com>2023-04-13 07:12:42 +0100
committerSam Atkins <atkinssj@gmail.com>2023-04-15 09:02:01 +0100
commite144b477bdc9cd02123bb9f47b73a913377b2b5d (patch)
treea4fc92d18f650f099818b01c53ee2b5a03a3c259
parent493fc65e4245abaf25ec02ed489fab6f341aa3db (diff)
downloadserenity-e144b477bdc9cd02123bb9f47b73a913377b2b5d.zip
Assistant: Replace usages of adopt_ref() with make_ref_counted()
Let's be consistent with how we construct Result objects.
-rw-r--r--Userland/Applications/Assistant/Providers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/Assistant/Providers.cpp b/Userland/Applications/Assistant/Providers.cpp
index 4f0ed7033a..31acca3a97 100644
--- a/Userland/Applications/Assistant/Providers.cpp
+++ b/Userland/Applications/Assistant/Providers.cpp
@@ -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);
}