Fix gcov build error 44/320744/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 21 Nov 2024 22:39:36 +0000 (07:39 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 21 Nov 2024 22:39:36 +0000 (07:39 +0900)
This patch fixes the following error:
 - '--param max-inline-insns-single limit reached'

Change-Id: I6f960ebd78f2af03918dbce50605bd6e2ad7e692
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
watchface-complication/design-element-implementation.hh
watchface-complication/design-element.cc
watchface-complication/received-editable-implementation.hh
watchface-complication/received-editable.cc
watchface-complication/watchface-complication.cc

index c5ae434e5156ee6554088e1a6d96de0e0d5a032a..7cd37a2835cbd5c3a2727ae5a8c628666c846d1d 100644 (file)
@@ -32,7 +32,7 @@ namespace watchface_complication {
 
 class DesignElement::Impl {
  public:
-  virtual ~Impl() = default;
+  virtual ~Impl();
 
  private:
   friend class DesignElement;
index 73ccb4bc375ff01b1a9852ebeb6e74e64d9f5e6b..3e6c12090c997e5b01ff32b1e2cf1a50c4ae65e6 100644 (file)
@@ -43,6 +43,8 @@ DesignElement::~DesignElement() {
 }
 /* LCOV_EXCL_STOP */
 
+DesignElement::Impl::~Impl() {}
+
 DesignElement::Impl::Impl(DesignElement* parent, int id, int cur_data_idx)
   : parent_(parent), id_(id), cur_data_idx_(cur_data_idx),
     editables_manager_(EditablesManager::GetInst()) {
index a0fb82030ef62b39d1b8f00ac5c51e135070b1f5..d05709f264af0b679502deb6087be5c060a3b6a2 100644 (file)
@@ -30,7 +30,7 @@ namespace watchface_complication {
 
 class ReceivedEditable::Impl {
  public:
-  virtual ~Impl() = default;
+  virtual ~Impl();
 
  private:
   friend class ReceivedEditable;
index 0ac5971a27df76b9f7b4d173a489e9eab5ca095a..d672b754eacd6b9f9cc6d510a3fb14ddde4820ea 100644 (file)
@@ -39,6 +39,9 @@ ReceivedEditable::ReceivedEditable(std::string raw)
 }
 
 ReceivedEditable::~ReceivedEditable() = default;
+
+ReceivedEditable::Impl::~Impl() {}
+
 ReceivedEditable::Impl::Impl(ReceivedEditable* parent, std::string raw)
   : parent_(parent) {
   if (raw.empty())
index c7afec992ca91c7dcbcfffbd9b55c51c38ca8263..539717d15bcdb2af461f3917ad07624bdaf47dbc 100644 (file)
@@ -141,12 +141,11 @@ class WatchComplicationStub : public Complication {
   WatchComplicationStub(int id, int supported_types, int supported_event_types,
                         const std::string& default_provider_id,
                         ComplicationType default_type)
-    : Complication(id, supported_types, supported_event_types,
-        default_provider_id, default_type) {
-  }
+      : Complication(id, supported_types, supported_event_types,
+                     default_provider_id, default_type) {}
   /* LCOV_EXCL_START */
   void OnProviderError(const std::string& provider_id, ComplicationType type,
-      int error) override {
+                       int error) override {
     for (auto& i : cb_list_) {
       i->InvokeErrorCallback(GetComplicationId(), provider_id, type, error);
     }
@@ -155,34 +154,25 @@ class WatchComplicationStub : public Complication {
   /* LCOV_EXCL_STOP */
 
   void OnDataUpdated(const std::string& provider_id, ComplicationType type,
-      const std::unique_ptr<Bundle>& data) override {
-    for (auto& i : cb_list_) {
-      i->Invoke(GetComplicationId(), provider_id, type, data);
-    }
-    LOGI("update call!! done");
-  }
+                     const std::unique_ptr<tizen_base::Bundle>& data) override;
 
   int AddCallbackInfo(unique_ptr<CallbackInfo> ci) {
     for (auto& i : cb_list_) {
-      if (i.get()->GetCallback() != ci->GetCallback())
-        continue;
+      if (i.get()->GetCallback() != ci->GetCallback()) continue;
       LOGI("already registered callback");
       return WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER;
     }
-    if (cb_list_.empty())
-      NotifyListeningStart();
+    if (cb_list_.empty()) NotifyListeningStart();
     cb_list_.emplace_back(move(ci));
     return WATCHFACE_COMPLICATION_ERROR_NONE;
   }
 
   int RemoveCallbackInfo(watchface_complication_updated_cb cb) {
     for (auto& i : cb_list_) {
-      if (i.get()->GetCallback() != cb)
-        continue;
+      if (i.get()->GetCallback() != cb) continue;
 
       cb_list_.remove(i);
-      if (cb_list_.empty())
-        NotifyListeningStop();
+      if (cb_list_.empty()) NotifyListeningStop();
 
       return WATCHFACE_COMPLICATION_ERROR_NONE;
     }
@@ -193,6 +183,15 @@ class WatchComplicationStub : public Complication {
   std::list<std::unique_ptr<CallbackInfo>> cb_list_;
 };
 
+void WatchComplicationStub::OnDataUpdated(
+    const std::string& provider_id, ComplicationType type,
+    const std::unique_ptr<tizen_base::Bundle>& data) {
+  for (auto& i : cb_list_) {
+    i->Invoke(GetComplicationId(), provider_id, type, data);
+  }
+  LOGI("update call!! done");
+}
+
 extern "C" EXPORT_API int watchface_complication_add_updated_cb(
     complication_h handle, watchface_complication_updated_cb cb,
     watchface_complication_error_cb error_cb, void* user_data) {