Index: test/UpdateCheck.cpp |
diff --git a/test/UpdateCheck.cpp b/test/UpdateCheck.cpp |
index e98697133ae14890bcbf5c96869c7fc230c21667..a6f9dd457104ca1d10935debe15cd51e28e1db69 100644 |
--- a/test/UpdateCheck.cpp |
+++ b/test/UpdateCheck.cpp |
@@ -19,6 +19,8 @@ |
#include "BaseJsTest.h" |
+using namespace AdblockPlus; |
+ |
namespace |
{ |
typedef std::shared_ptr<AdblockPlus::FilterEngine> FilterEnginePtr; |
@@ -74,8 +76,11 @@ namespace |
jsEngine->SetLogSystem(AdblockPlus::LogSystemPtr(new LazyLogSystem)); |
jsEngine->SetFileSystem(AdblockPlus::FileSystemPtr(new LazyFileSystem)); |
jsEngine->SetWebRequest(webRequestPtr); |
- jsEngine->SetEventCallback("updateAvailable", |
- std::bind(&UpdateCheckTest::EventCallback, this, std::placeholders::_1)); |
+ jsEngine->SetEventCallback("updateAvailable", [this](JsValueList&& params) |
+ { |
+ eventCallbackCalled = true; |
+ eventCallbackParams = std::move(params); |
+ }); |
filterEngine = AdblockPlus::FilterEngine::Create(jsEngine); |
} |
@@ -86,12 +91,6 @@ namespace |
std::bind(&UpdateCheckTest::UpdateCallback, this, std::placeholders::_1)); |
} |
- void EventCallback(const AdblockPlus::JsValueList& params) |
- { |
- eventCallbackCalled = true; |
- eventCallbackParams = params; |
- } |
- |
void UpdateCallback(const std::string& error) |
{ |
updateCallbackCalled = true; |