Skip to content

Commit dd351b9

Browse files
committed
Update method names in comments
Some method names have changed from libsigc++2 to libsigc++3, but not all comments have been changed accordingly. * sigc++/connection.h: Correct some parameter names in doxygen comments. connection::notify() has been replaced by a private method in weak_raw_ptr. * sigc++/signal_base.[cc|h]: signal_impl::notify() has been renamed notify_self_and_iter_of_invalidated_slot().
1 parent 58521af commit dd351b9

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

sigc++/connection.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ struct SIGC_API connection
4343
connection(const connection& c);
4444

4545
/** Constructs a connection object from a slot object.
46-
* @param sl The slot to operate on.
46+
* @param slot The slot to operate on.
4747
*/
4848
explicit connection(slot_base& slot);
4949

5050
/** Overrides this connection object copying another one.
51-
* @param c The connection object to make a copy from.
51+
* @param src The connection object to make a copy from.
5252
*/
5353
connection& operator=(const connection& src);
5454

@@ -92,8 +92,8 @@ struct SIGC_API connection
9292
private:
9393
void set_slot(const sigc::internal::weak_raw_ptr<slot_base>& sl);
9494

95-
/* Referred slot. Set to zero from notify().
96-
* A value of zero indicates an "empty" connection.
95+
/* Referred slot. Set to nullptr when the referred slot is deleted.
96+
* A value of nullptr indicates an "empty" connection.
9797
*/
9898
sigc::internal::weak_raw_ptr<slot_base> slot_;
9999
};

sigc++/signal_base.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ namespace internal
2424
{
2525

2626
// Data sent from signal_impl::insert() to slot_rep::set_parent() when a slot is
27-
// connected, and then sent from slot_rep::disconnect() to signal_impl::notify()
27+
// connected, and then sent from slot_rep::disconnect() to
28+
// signal_impl::notify_self_and_iter_of_invalidated_slot()
2829
// when the slot is disconnected. Bug 167714.
2930
struct self_and_iter : public notifiable
3031
{
@@ -63,8 +64,8 @@ signal_impl::operator delete(void* p)
6364
void
6465
signal_impl::clear()
6566
{
66-
// Don't let signal_impl::notify() erase the slots. It would invalidate the
67-
// iterator in the following loop.
67+
// Don't let signal_impl::notify_self_and_iter_of_invalidated_slot() erase the slots.
68+
// It would invalidate the iterator in the following loop.
6869
// Don't call shared_from_this() here. clear() is called from the destructor.
6970
// When the destructor is executing, shared_ptr's use_count has reached 0,
7071
// and it's no longer possible to get a shared_ptr to this.
@@ -73,7 +74,8 @@ signal_impl::clear()
7374
signal_impl_exec_holder exec(this);
7475

7576
// Disconnect all connected slots before they are deleted.
76-
// signal_impl::notify() will be called and delete the self_and_iter structs.
77+
// signal_impl::notify_self_and_iter_of_invalidated_slot() will be called and
78+
// delete the self_and_iter structs.
7779
for (auto& slot : slots_)
7880
slot.disconnect();
7981

sigc++/signal_base.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ namespace internal
3636
{
3737

3838
/** Implementation of the signal interface.
39-
* signal_impl manages a list of slots. When a slot becomes
40-
* invalid (because some referred object dies), notify() is executed.
41-
* notify() either calls slots_.erase() directly or defers the execution of
42-
* erase() to sweep() when the signal is being emitted. sweep() removes all
43-
* invalid slots from the list.
39+
* signal_impl manages a list of slots. When a slot becomes invalid (because some
40+
* referred object dies), notify_self_and_iter_of_invalidated_slot() is executed.
41+
* notify_self_and_iter_of_invalidated_slot() either calls slots_.erase() directly
42+
* or defers the execution of erase() to sweep() when the signal is being emitted.
43+
* sweep() removes all invalid slots from the list.
4444
*/
4545
struct SIGC_API signal_impl
4646
: public std::enable_shared_from_this<signal_impl>

0 commit comments

Comments
 (0)