Browse Source

signal: default destructor and noexcept-ness review

Michele Caini 1 year ago
parent
commit
5ecf9eb893
2 changed files with 5 additions and 2 deletions
  1. 4 1
      src/entt/signal/dispatcher.hpp
  2. 1 1
      src/entt/signal/sigh.hpp

+ 4 - 1
src/entt/signal/dispatcher.hpp

@@ -21,7 +21,7 @@ namespace entt {
 namespace internal {
 namespace internal {
 
 
 struct basic_dispatcher_handler {
 struct basic_dispatcher_handler {
-    virtual ~basic_dispatcher_handler() = default;
+    virtual ~basic_dispatcher_handler() noexcept = default;
     virtual void publish() = 0;
     virtual void publish() = 0;
     virtual void disconnect(void *) = 0;
     virtual void disconnect(void *) = 0;
     virtual void clear() noexcept = 0;
     virtual void clear() noexcept = 0;
@@ -175,6 +175,9 @@ public:
         ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a dispatcher is not allowed");
         ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a dispatcher is not allowed");
     }
     }
 
 
+    /*! @brief Default destructor. */
+    ~basic_dispatcher() noexcept = default;
+
     /**
     /**
      * @brief Move assignment operator.
      * @brief Move assignment operator.
      * @param other The instance to move from.
      * @param other The instance to move from.

+ 1 - 1
src/entt/signal/sigh.hpp

@@ -291,7 +291,7 @@ struct scoped_connection {
         : conn{std::exchange(other.conn, {})} {}
         : conn{std::exchange(other.conn, {})} {}
 
 
     /*! @brief Automatically breaks the link on destruction. */
     /*! @brief Automatically breaks the link on destruction. */
-    ~scoped_connection() {
+    ~scoped_connection() noexcept {
         conn.release();
         conn.release();
     }
     }