diff --git a/src/mail.cc b/src/mail.cc index 79f96dbb..1f331a20 100644 --- a/src/mail.cc +++ b/src/mail.cc @@ -145,13 +145,13 @@ namespace { virtual void merge(callback_base &&other) { - Base::merge(other); - mail_cb &&o = dynamic_cast(other); if(retries < o.retries) { retries = o.retries; fail = 0; } + + Base::merge(std::move(other)); } mail_cb(uint32_t period, const Tuple &tuple, uint16_t retries_) diff --git a/src/update-cb.cc b/src/update-cb.cc index 2ec20131..ad8b2d63 100644 --- a/src/update-cb.cc +++ b/src/update-cb.cc @@ -79,7 +79,7 @@ namespace conky { const auto &p = callbacks.insert(h); if(not p.second) - (*p.first)->merge(*h); + (*p.first)->merge(std::move(*h)); return *p.first; }