Address cpplint issue "Constructors callable with one argument should be marked explicit. [runtime/explicit] [5]"
This commit is contained in:
parent
1a7d9a5d20
commit
3336e02769
2 changed files with 4 additions and 4 deletions
|
@ -260,7 +260,7 @@ DesktopNotificationController::Notification
|
||||||
data->image = CopyBitmap(image);
|
data->image = CopyBitmap(image);
|
||||||
|
|
||||||
// Enqueue new notification
|
// Enqueue new notification
|
||||||
Notification ret = *queue_.insert(queue_.end(), move(data));
|
Notification ret { *queue_.insert(queue_.end(), move(data)) };
|
||||||
CheckQueue();
|
CheckQueue();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ struct NotificationData;
|
||||||
|
|
||||||
class DesktopNotificationController {
|
class DesktopNotificationController {
|
||||||
public:
|
public:
|
||||||
DesktopNotificationController(unsigned maximumToasts = 3);
|
explicit DesktopNotificationController(unsigned maximumToasts = 3);
|
||||||
~DesktopNotificationController();
|
~DesktopNotificationController();
|
||||||
|
|
||||||
class Notification;
|
class Notification;
|
||||||
|
@ -43,7 +43,7 @@ class DesktopNotificationController {
|
||||||
// the `controller` member is cleared when the controller object
|
// the `controller` member is cleared when the controller object
|
||||||
// stops tracking the notification
|
// stops tracking the notification
|
||||||
struct NotificationLink : std::shared_ptr<NotificationData> {
|
struct NotificationLink : std::shared_ptr<NotificationData> {
|
||||||
NotificationLink(DesktopNotificationController* controller);
|
explicit NotificationLink(DesktopNotificationController* controller);
|
||||||
~NotificationLink();
|
~NotificationLink();
|
||||||
|
|
||||||
NotificationLink(NotificationLink&&) = default;
|
NotificationLink(NotificationLink&&) = default;
|
||||||
|
@ -90,7 +90,7 @@ class DesktopNotificationController {
|
||||||
class DesktopNotificationController::Notification {
|
class DesktopNotificationController::Notification {
|
||||||
public:
|
public:
|
||||||
Notification() = default;
|
Notification() = default;
|
||||||
Notification(const std::shared_ptr<NotificationData>& data);
|
explicit Notification(const std::shared_ptr<NotificationData>& data);
|
||||||
|
|
||||||
bool operator==(const Notification& other) const;
|
bool operator==(const Notification& other) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue