Index: src/Notification.cpp |
diff --git a/src/Notification.cpp b/src/Notification.cpp |
index d7514889f260caab664503cdf176d111532e896a..b8c1a8d203167f0a5a3773b0e13379ac270ac75b 100644 |
--- a/src/Notification.cpp |
+++ b/src/Notification.cpp |
@@ -57,8 +57,8 @@ namespace |
} |
} |
-Notification::Notification(const JsValuePtr& jsValue) |
- : JsValue(jsValue) |
+Notification::Notification(JsValue&& jsValue) |
+ : JsValue(std::move(jsValue)) |
{ |
} |
@@ -101,14 +101,14 @@ void Notification::MarkAsShown() |
jsEngine->Evaluate("API.markNotificationAsShown")->Call(params); |
} |
-NotificationPtr Notification::JsValueToNotification(const JsValuePtr& jsValue) |
+NotificationPtr Notification::JsValueToNotification(JsValue&& jsValue) |
{ |
- if (!jsValue || !jsValue->IsObject()) |
+ if (!jsValue.IsObject()) |
{ |
return NotificationPtr(); |
} |
- NotificationPtr notification(new Notification(jsValue)); |
+ NotificationPtr notification(new Notification(std::move(jsValue))); |
JsValuePtr jsType = notification->GetProperty("type"); |
notification->type = StringToNotificationType(jsType ? jsType->AsString() : ""); |