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

Unified Diff: src/Notification.cpp

Issue 29419629: Issue 5164 - Remove NotificationPtr (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Call the inherited assignment operator properly Created April 24, 2017, 8:16 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 | « src/FilterEngine.cpp ('k') | test/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Notification.cpp
===================================================================
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -52,21 +52,43 @@
if (notificationTypeIterator == notificationTypes.end())
{
return NotificationType::NOTIFICATION_TYPE_INFORMATION;
}
return notificationTypeIterator->first;
}
}
+Notification::Notification(const Notification& src)
+ : JsValue(src)
+{
+}
+
+Notification::Notification(Notification&& src)
+ : JsValue(std::move(src))
+{
+}
+
Notification::Notification(JsValue&& jsValue)
: JsValue(std::move(jsValue))
{
}
+Notification& Notification::operator=(const Notification& src)
+{
+ static_cast<JsValue&>(*this) = src;
+ return *this;
+}
+
+Notification& Notification::operator=(Notification&& src)
+{
+ static_cast<JsValue&>(*this) = std::move(src);
+ return *this;
+}
+
NotificationType Notification::GetType() const
{
return StringToNotificationType(GetProperty("type").AsString());
}
NotificationTexts Notification::GetTexts() const
{
JsValue jsTexts = jsEngine->Evaluate("API.getNotificationTexts").Call(*this);
« no previous file with comments | « src/FilterEngine.cpp ('k') | test/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld