Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/Platform.cpp

Issue 29508591: Issue 5450 - don't expose std::shared_ptr<FilterEngine> (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: rebase Created Aug. 7, 2017, 1:08 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « shell/src/Main.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Platform.cpp
diff --git a/src/Platform.cpp b/src/Platform.cpp
index ede0dca6b0af370648a1a9b3fb5e80c09431e745..4d300cd8fa38704d794a0726e361612121782daf 100644
--- a/src/Platform.cpp
+++ b/src/Platform.cpp
@@ -95,14 +95,14 @@ void Platform::CreateFilterEngineAsync(const FilterEngine::CreationParameters& p
{
filterEnginePromise->set_value(filterEngine);
if (onCreated)
- onCreated(filterEngine);
+ onCreated(*filterEngine);
}, parameters);
}
-FilterEnginePtr Platform::GetFilterEngine()
+FilterEngine& Platform::GetFilterEngine()
{
CreateFilterEngineAsync();
- return std::shared_future<FilterEnginePtr>(filterEngine).get();
+ return *std::shared_future<FilterEnginePtr>(filterEngine).get();
}
ITimer& Platform::GetTimer()
« no previous file with comments | « shell/src/Main.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld