diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-03-03 13:11:49 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-03-03 13:11:49 +0100 |
commit | f20b5363a1c3e7ce660b6f17acc36867c0ca89fb (patch) | |
tree | b99ce9fee482fdf928260cb2f9d1dacd765525f0 | |
parent | 6a8c86965e86d2482881bbebca08f4293a4ac1b2 (diff) | |
download | sigc++-f20b5363a1c3e7ce660b6f17acc36867c0ca89fb.tar.gz |
Connection::operator bool(): Make this const.
-rw-r--r-- | sigc++/connection.cc | 2 | ||||
-rw-r--r-- | sigc++/connection.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sigc++/connection.cc b/sigc++/connection.cc index 79d1202..228952b 100644 --- a/sigc++/connection.cc +++ b/sigc++/connection.cc @@ -83,7 +83,7 @@ void connection::disconnect() slot_->disconnect(); // This notifies slot_'s parent. } -connection::operator bool() noexcept +connection::operator bool() const noexcept { return !empty(); } diff --git a/sigc++/connection.h b/sigc++/connection.h index f8a55e2..87202de 100644 --- a/sigc++/connection.h +++ b/sigc++/connection.h @@ -104,11 +104,10 @@ struct SIGC_API connection : public notifiable /// Disconnects the referred slot. void disconnect(); - //TODO: When we can break API and ABI, make operator bool() const /** Returns whether the connection is still active. * @return @p true if the connection is still active. */ - explicit operator bool() noexcept; + explicit operator bool() const noexcept; /** Callback that is executed when the referred slot is destroyed. * @param data The connection object notified (@p this). |