summaryrefslogtreecommitdiff
path: root/Userland/Applications/Assistant/main.cpp
diff options
context:
space:
mode:
authorRummskartoffel <Rummskartoffel@protonmail.com>2022-01-15 15:23:40 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-15 21:45:03 +0100
commitada1d4906e016f7b55ffd0e8f74a78b55d6a4694 (patch)
treeee1af4c6412850d8eb3b993d81b5e07637af6fd3 /Userland/Applications/Assistant/main.cpp
parent5fe619de990f646e474a6e90a4f432075d5abb30 (diff)
downloadserenity-ada1d4906e016f7b55ffd0e8f74a78b55d6a4694.zip
Assistant: Make Provider ref-counted
Diffstat (limited to 'Userland/Applications/Assistant/main.cpp')
-rw-r--r--Userland/Applications/Assistant/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/Assistant/main.cpp b/Userland/Applications/Assistant/main.cpp
index 522e65a444..f58df60e4d 100644
--- a/Userland/Applications/Assistant/main.cpp
+++ b/Userland/Applications/Assistant/main.cpp
@@ -122,11 +122,11 @@ public:
explicit Database(AppState& state)
: m_state(state)
{
- m_providers.append(make<AppProvider>());
- m_providers.append(make<CalculatorProvider>());
- m_providers.append(make<FileProvider>());
- m_providers.append(make<TerminalProvider>());
- m_providers.append(make<URLProvider>());
+ m_providers.append(make_ref_counted<AppProvider>());
+ m_providers.append(make_ref_counted<CalculatorProvider>());
+ m_providers.append(make_ref_counted<FileProvider>());
+ m_providers.append(make_ref_counted<TerminalProvider>());
+ m_providers.append(make_ref_counted<URLProvider>());
}
Function<void(NonnullRefPtrVector<Result>)> on_new_results;
@@ -176,7 +176,7 @@ private:
AppState& m_state;
- NonnullOwnPtrVector<Provider> m_providers;
+ NonnullRefPtrVector<Provider> m_providers;
Threading::Mutex m_mutex;
HashMap<String, NonnullRefPtrVector<Result>> m_result_cache;