[libsigcplusplus] Remove signal_base::erase() and signal_impl::erase()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] Remove signal_base::erase() and signal_impl::erase()
- Date: Mon, 17 Jul 2017 13:46:00 +0000 (UTC)
commit 58521af49e448fd3d4b794eea19c886320ecd4a1
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Mon Jul 17 15:34:12 2017 +0200
Remove signal_base::erase() and signal_impl::erase()
They are not used in libsigc++3. Bug 784550
sigc++/signal_base.cc | 25 +------------------------
sigc++/signal_base.h | 13 -------------
2 files changed, 1 insertions(+), 37 deletions(-)
---
diff --git a/sigc++/signal_base.cc b/sigc++/signal_base.cc
index 875a3ae..5218f20 100644
--- a/sigc++/signal_base.cc
+++ b/sigc++/signal_base.cc
@@ -126,23 +126,6 @@ signal_impl::connect(slot_base&& slot_)
return insert(slots_.end(), std::move(slot_));
}
-signal_impl::iterator_type
-signal_impl::erase(iterator_type i)
-{
- // Don't let signal_impl::notify() erase the slot. It would be more
- // difficult to get the correct return value from signal_impl::erase().
- const bool saved_deferred = deferred_;
- signal_impl_holder exec(shared_from_this());
-
- // Disconnect the slot before it is deleted.
- // signal_impl::notify() will be called and delete the self_and_iter struct.
- i->disconnect();
-
- deferred_ = saved_deferred;
-
- return slots_.erase(i);
-}
-
void
signal_impl::add_notification_to_iter(const signal_impl::iterator_type& iter)
{
@@ -212,7 +195,7 @@ signal_impl::notify_self_and_iter_of_invalidated_slot(notifiable* d)
// This is occurring during signal emission or slot erasure.
// => sweep() will be called from ~signal_impl_holder() after signal emission.
// This is safer because we don't have to care about our
- // iterators in emit(), clear(), and erase().
+ // iterators in emit() and clear().
self->deferred_ = true;
}
}
@@ -293,12 +276,6 @@ signal_base::insert(iterator_type i, slot_base&& slot_)
return impl()->insert(i, std::move(slot_));
}
-signal_base::iterator_type
-signal_base::erase(iterator_type i)
-{
- return impl()->erase(i);
-}
-
signal_base&
signal_base::operator=(const signal_base& src)
{
diff --git a/sigc++/signal_base.h b/sigc++/signal_base.h
index bcff3aa..9b1e815 100644
--- a/sigc++/signal_base.h
+++ b/sigc++/signal_base.h
@@ -143,12 +143,6 @@ struct SIGC_API signal_impl
*/
iterator_type insert(iterator_type i, slot_base&& slot_);
- /** Removes the slot at the given position from the list of slots.
- * @param i An iterator pointing to the slot to be removed.
- * @return An iterator pointing to the slot in the list after the one removed.
- */
- iterator_type erase(iterator_type i);
-
/// Removes invalid slots from the list of slots.
void sweep();
@@ -382,13 +376,6 @@ protected:
*/
iterator_type insert(iterator_type i, slot_base&& slot_);
- /** Removes the slot at the given position from the list of slots.
- * Note that this function does not work during signal emission!
- * @param i An iterator pointing to the slot to be removed.
- * @return An iterator pointing to the slot in the list after the one removed.
- */
- iterator_type erase(iterator_type i);
-
/** Returns the signal_impl object encapsulating the list of slots.
* @return The signal_impl object encapsulating the list of slots.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]