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

Delta Between Two Patch Sets: src/Notification.cpp

Issue 29419629: Issue 5164 - Remove NotificationPtr (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Left Patch Set: Added arg name to declaration + doc comments Created April 24, 2017, 6:49 p.m.
Right Patch Set: Call the inherited assignment operator properly Created April 24, 2017, 8:16 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/FilterEngine.cpp ('k') | test/Notification.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 { 67 {
68 } 68 }
69 69
70 Notification::Notification(JsValue&& jsValue) 70 Notification::Notification(JsValue&& jsValue)
71 : JsValue(std::move(jsValue)) 71 : JsValue(std::move(jsValue))
72 { 72 {
73 } 73 }
74 74
75 Notification& Notification::operator=(const Notification& src) 75 Notification& Notification::operator=(const Notification& src)
76 { 76 {
77 *this = src; 77 static_cast<JsValue&>(*this) = src;
78 return *this;
79 }
80
81 Notification& Notification::operator=(Notification&& src)
82 {
83 static_cast<JsValue&>(*this) = std::move(src);
78 return *this; 84 return *this;
79 } 85 }
80 86
81 NotificationType Notification::GetType() const 87 NotificationType Notification::GetType() const
82 { 88 {
83 return StringToNotificationType(GetProperty("type").AsString()); 89 return StringToNotificationType(GetProperty("type").AsString());
84 } 90 }
85 91
86 NotificationTexts Notification::GetTexts() const 92 NotificationTexts Notification::GetTexts() const
87 { 93 {
(...skipping 25 matching lines...) Expand all
113 { 119 {
114 retValue.push_back(link.AsString()); 120 retValue.push_back(link.AsString());
115 } 121 }
116 return retValue; 122 return retValue;
117 } 123 }
118 124
119 void Notification::MarkAsShown() 125 void Notification::MarkAsShown()
120 { 126 {
121 jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id")); 127 jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id"));
122 } 128 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld