| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 Loading... | |
| 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; | 78 return *this; |
| 79 } | 79 } |
| 80 | 80 |
| 81 Notification& Notification::operator=(Notification&& src) | 81 Notification& Notification::operator=(Notification&& src) |
| 82 { | 82 { |
| 83 *this = std::move(src); | 83 static_cast<JsValue&>(*this) = std::move(src); |
|
sergei
2017/04/24 19:28:15
It will cause an infinite recursion. It should be
hub
2017/04/24 20:17:04
oops. same with the assignment (copy).
| |
| 84 return *this; | 84 return *this; |
| 85 } | 85 } |
| 86 | 86 |
| 87 NotificationType Notification::GetType() const | 87 NotificationType Notification::GetType() const |
| 88 { | 88 { |
| 89 return StringToNotificationType(GetProperty("type").AsString()); | 89 return StringToNotificationType(GetProperty("type").AsString()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 NotificationTexts Notification::GetTexts() const | 92 NotificationTexts Notification::GetTexts() const |
| 93 { | 93 { |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 119 { | 119 { |
| 120 retValue.push_back(link.AsString()); | 120 retValue.push_back(link.AsString()); |
| 121 } | 121 } |
| 122 return retValue; | 122 return retValue; |
| 123 } | 123 } |
| 124 | 124 |
| 125 void Notification::MarkAsShown() | 125 void Notification::MarkAsShown() |
| 126 { | 126 { |
| 127 jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id")); | 127 jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id")); |
| 128 } | 128 } |
| LEFT | RIGHT |