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

Unified Diff: include/AdblockPlus/JsEngine.h

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 | « include/AdblockPlus/FilterEngine.h ('k') | src/FilterEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
diff --git a/include/AdblockPlus/JsEngine.h b/include/AdblockPlus/JsEngine.h
index ea35745bf0749031a4b5b160340c837ffee2602a..10e27ed4a2b94a0a4e03f6487642c716c6b0b887 100644
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -93,7 +93,7 @@ namespace AdblockPlus
/**
* Event callback function.
*/
- typedef std::function<void(const JsValueList& params)> EventCallback;
+ typedef std::function<void(JsValueList&& params)> EventCallback;
/**
* Callback function returning false when current connection is not allowed
@@ -137,7 +137,7 @@ namespace AdblockPlus
* @param eventName Event name.
* @param params Event parameters.
*/
- void TriggerEvent(const std::string& eventName, const JsValueList& params);
+ void TriggerEvent(const std::string& eventName, JsValueList&& params);
/**
* Evaluates a JavaScript expression.
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | src/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld