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

Unified Diff: test/Notification.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/JsEngine.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Notification.cpp
diff --git a/test/Notification.cpp b/test/Notification.cpp
index a014aefef944c751d69a84288726437a4db48cca..d8eae7ad8c86a57aded7f380c028de2806379db6 100644
--- a/test/Notification.cpp
+++ b/test/Notification.cpp
@@ -52,7 +52,7 @@ namespace
{
std::unique_ptr<Notification> retValue;
filterEngine->SetShowNotificationCallback(
- [&retValue](Notification& notification) {
+ [&retValue](Notification&& notification) {
retValue.reset(new Notification(std::move(notification)));
});
filterEngine->ShowNextNotification(url);
@@ -111,7 +111,7 @@ namespace
jsEngine->SetLogSystem(LogSystemPtr(new DefaultLogSystem()));
filterEngine = FilterEngine::Create(jsEngine);
filterEngine->SetShowNotificationCallback(
- [this](Notification& notification) {
+ [this](Notification&& notification) {
isNotificationCallbackCalled = true;
EXPECT_EQ(NotificationType::NOTIFICATION_TYPE_INFORMATION, notification.GetType());
EXPECT_EQ("Title", notification.GetTexts().title);
« no previous file with comments | « test/JsEngine.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld