diff --git a/frameworks/ans/test/moduletest/ans_fw_module_test.cpp b/frameworks/ans/test/moduletest/ans_fw_module_test.cpp index b91b520c59f78cd650b29c5dd056ef179fad3919..ecbcac893a78a682b2b225c5b1c5930e4f8e14da 100644 --- a/frameworks/ans/test/moduletest/ans_fw_module_test.cpp +++ b/frameworks/ans/test/moduletest/ans_fw_module_test.cpp @@ -92,7 +92,7 @@ public: } protected: - SubscriberEvent(SubscriberEventType type) : type_(type) + explicit SubscriberEvent(SubscriberEventType type) : type_(type) {} SubscriberEventType type_; @@ -127,7 +127,7 @@ public: class OnUpdatedEvent : public SubscriberEvent { public: - OnUpdatedEvent(const std::shared_ptr &sortingMap) + explicit OnUpdatedEvent(const std::shared_ptr &sortingMap) : SubscriberEvent(SubscriberEventType::ON_UPDATE), sortingMap_(sortingMap) {} @@ -199,7 +199,7 @@ private: class OnOnCanceledWithSortingMapAndDeleteReasonEvent : public SubscriberEvent { public: - OnOnCanceledWithSortingMapAndDeleteReasonEvent(const std::shared_ptr &request, + explicit OnOnCanceledWithSortingMapAndDeleteReasonEvent(const std::shared_ptr &request, const std::shared_ptr &sortingMap, int deleteReason) : SubscriberEvent(SubscriberEventType::ON_CANCELED_WITH_SORTINGMAP_AND_DELETEREASON), request_(request), @@ -249,7 +249,7 @@ private: class OnConsumedWithSortingMapEvent : public SubscriberEvent { public: - OnConsumedWithSortingMapEvent( + explicit OnConsumedWithSortingMapEvent( const std::shared_ptr &request, const std::shared_ptr &sortingMap) : SubscriberEvent(SubscriberEventType::ON_CONSUMED_WITH_SORTINGMAP), request_(request), sortingMap_(sortingMap) {