summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2017-07-17 15:41:10 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2017-07-17 15:41:10 +0200
commitdd351b9f4b83035fd8f916a87f91ab7a18ff9b78 (patch)
tree14cf90277a6d3fed2bb280fd71f109cc08de9442
parent58521af49e448fd3d4b794eea19c886320ecd4a1 (diff)
downloadsigc++-dd351b9f4b83035fd8f916a87f91ab7a18ff9b78.tar.gz
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().
-rw-r--r--sigc++/connection.h8
-rw-r--r--sigc++/signal_base.cc10
-rw-r--r--sigc++/signal_base.h10
3 files changed, 15 insertions, 13 deletions
diff --git a/sigc++/connection.h b/sigc++/connection.h
index 7847810..4b4926e 100644
--- a/sigc++/connection.h
+++ b/sigc++/connection.h
@@ -43,12 +43,12 @@ struct SIGC_API connection
connection(const connection& c);
/** Constructs a connection object from a slot object.
- * @param sl The slot to operate on.
+ * @param slot The slot to operate on.
*/
explicit connection(slot_base& slot);
/** Overrides this connection object copying another one.
- * @param c The connection object to make a copy from.
+ * @param src The connection object to make a copy from.
*/
connection& operator=(const connection& src);
@@ -92,8 +92,8 @@ struct SIGC_API connection
private:
void set_slot(const sigc::internal::weak_raw_ptr<slot_base>& sl);
- /* Referred slot. Set to zero from notify().
- * A value of zero indicates an "empty" connection.
+ /* Referred slot. Set to nullptr when the referred slot is deleted.
+ * A value of nullptr indicates an "empty" connection.
*/
sigc::internal::weak_raw_ptr<slot_base> slot_;
};
diff --git a/sigc++/signal_base.cc b/sigc++/signal_base.cc
index 5218f20..67f493e 100644
--- a/sigc++/signal_base.cc
+++ b/sigc++/signal_base.cc
@@ -24,7 +24,8 @@ namespace internal
{
// Data sent from signal_impl::insert() to slot_rep::set_parent() when a slot is
-// connected, and then sent from slot_rep::disconnect() to signal_impl::notify()
+// connected, and then sent from slot_rep::disconnect() to
+// signal_impl::notify_self_and_iter_of_invalidated_slot()
// when the slot is disconnected. Bug 167714.
struct self_and_iter : public notifiable
{
@@ -63,8 +64,8 @@ signal_impl::operator delete(void* p)
void
signal_impl::clear()
{
- // Don't let signal_impl::notify() erase the slots. It would invalidate the
- // iterator in the following loop.
+ // Don't let signal_impl::notify_self_and_iter_of_invalidated_slot() erase the slots.
+ // It would invalidate the iterator in the following loop.
// Don't call shared_from_this() here. clear() is called from the destructor.
// When the destructor is executing, shared_ptr's use_count has reached 0,
// and it's no longer possible to get a shared_ptr to this.
@@ -73,7 +74,8 @@ signal_impl::clear()
signal_impl_exec_holder exec(this);
// Disconnect all connected slots before they are deleted.
- // signal_impl::notify() will be called and delete the self_and_iter structs.
+ // signal_impl::notify_self_and_iter_of_invalidated_slot() will be called and
+ // delete the self_and_iter structs.
for (auto& slot : slots_)
slot.disconnect();
diff --git a/sigc++/signal_base.h b/sigc++/signal_base.h
index 9b1e815..514ddfe 100644
--- a/sigc++/signal_base.h
+++ b/sigc++/signal_base.h
@@ -36,11 +36,11 @@ namespace internal
{
/** Implementation of the signal interface.
- * signal_impl manages a list of slots. When a slot becomes
- * invalid (because some referred object dies), notify() is executed.
- * notify() either calls slots_.erase() directly or defers the execution of
- * erase() to sweep() when the signal is being emitted. sweep() removes all
- * invalid slots from the list.
+ * signal_impl manages a list of slots. When a slot becomes invalid (because some
+ * referred object dies), notify_self_and_iter_of_invalidated_slot() is executed.
+ * notify_self_and_iter_of_invalidated_slot() either calls slots_.erase() directly
+ * or defers the execution of erase() to sweep() when the signal is being emitted.
+ * sweep() removes all invalid slots from the list.
*/
struct SIGC_API signal_impl
: public std::enable_shared_from_this<signal_impl>