[libsigcplusplus/variadic_mem_fun3: 101/148] Connection::operator bool(): Make this const.



commit c43d9748c8c3fe365924d4988bc36d98b126bd9d
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Mar 3 13:11:49 2016 +0100

    Connection::operator bool(): Make this const.

 sigc++/connection.cc |    2 +-
 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).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]