Skip to content

Commit 58521af

Browse files
committed
Remove signal_base::erase() and signal_impl::erase()
They are not used in libsigc++3. Bug 784550
1 parent 8e78fb4 commit 58521af

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

sigc++/signal_base.cc

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -126,23 +126,6 @@ signal_impl::connect(slot_base&& slot_)
126126
return insert(slots_.end(), std::move(slot_));
127127
}
128128

129-
signal_impl::iterator_type
130-
signal_impl::erase(iterator_type i)
131-
{
132-
// Don't let signal_impl::notify() erase the slot. It would be more
133-
// difficult to get the correct return value from signal_impl::erase().
134-
const bool saved_deferred = deferred_;
135-
signal_impl_holder exec(shared_from_this());
136-
137-
// Disconnect the slot before it is deleted.
138-
// signal_impl::notify() will be called and delete the self_and_iter struct.
139-
i->disconnect();
140-
141-
deferred_ = saved_deferred;
142-
143-
return slots_.erase(i);
144-
}
145-
146129
void
147130
signal_impl::add_notification_to_iter(const signal_impl::iterator_type& iter)
148131
{
@@ -212,7 +195,7 @@ signal_impl::notify_self_and_iter_of_invalidated_slot(notifiable* d)
212195
// This is occurring during signal emission or slot erasure.
213196
// => sweep() will be called from ~signal_impl_holder() after signal emission.
214197
// This is safer because we don't have to care about our
215-
// iterators in emit(), clear(), and erase().
198+
// iterators in emit() and clear().
216199
self->deferred_ = true;
217200
}
218201
}
@@ -293,12 +276,6 @@ signal_base::insert(iterator_type i, slot_base&& slot_)
293276
return impl()->insert(i, std::move(slot_));
294277
}
295278

296-
signal_base::iterator_type
297-
signal_base::erase(iterator_type i)
298-
{
299-
return impl()->erase(i);
300-
}
301-
302279
signal_base&
303280
signal_base::operator=(const signal_base& src)
304281
{

sigc++/signal_base.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,6 @@ struct SIGC_API signal_impl
143143
*/
144144
iterator_type insert(iterator_type i, slot_base&& slot_);
145145

146-
/** Removes the slot at the given position from the list of slots.
147-
* @param i An iterator pointing to the slot to be removed.
148-
* @return An iterator pointing to the slot in the list after the one removed.
149-
*/
150-
iterator_type erase(iterator_type i);
151-
152146
/// Removes invalid slots from the list of slots.
153147
void sweep();
154148

@@ -382,13 +376,6 @@ struct SIGC_API signal_base
382376
*/
383377
iterator_type insert(iterator_type i, slot_base&& slot_);
384378

385-
/** Removes the slot at the given position from the list of slots.
386-
* Note that this function does not work during signal emission!
387-
* @param i An iterator pointing to the slot to be removed.
388-
* @return An iterator pointing to the slot in the list after the one removed.
389-
*/
390-
iterator_type erase(iterator_type i);
391-
392379
/** Returns the signal_impl object encapsulating the list of slots.
393380
* @return The signal_impl object encapsulating the list of slots.
394381
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy