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

Unified Diff: test/JsEngine.cpp

Issue 29422625: Issue 5189 - use r-value references when objects should be transferred (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 26, 2017, 2:14 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 | « test/FilterEngine.cpp ('k') | test/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/JsEngine.cpp
diff --git a/test/JsEngine.cpp b/test/JsEngine.cpp
index 15f7a401c137cf32ec6d94b6cfd99b13af0b866e..68e5b68a9882f3686202cdd062a6d8199c95d691 100644
--- a/test/JsEngine.cpp
+++ b/test/JsEngine.cpp
@@ -18,6 +18,8 @@
#include <stdexcept>
#include "BaseJsTest.h"
+using namespace AdblockPlus;
+
namespace
{
class JsEngineTest : public BaseJsTest
@@ -127,11 +129,10 @@ TEST_F(JsEngineTest, EventCallbacks)
{
bool callbackCalled = false;
AdblockPlus::JsValueList callbackParams;
- auto Callback = [&callbackCalled, & callbackParams](
- const AdblockPlus::JsValueList& params)
+ auto Callback = [&callbackCalled, &callbackParams](JsValueList&& params)
{
callbackCalled = true;
- callbackParams = params;
+ callbackParams = move(params);
};
// Trigger event without a callback
« no previous file with comments | « test/FilterEngine.cpp ('k') | test/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld