Sfoglia il codice sorgente

scheduler: swap based move assignment operator

Michele Caini 1 anno fa
parent
commit
63d6db37d8
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/entt/process/scheduler.hpp

+ 1 - 1
src/entt/process/scheduler.hpp

@@ -145,7 +145,7 @@ public:
      */
      */
     basic_scheduler &operator=(basic_scheduler &&other) noexcept {
     basic_scheduler &operator=(basic_scheduler &&other) noexcept {
         ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a scheduler is not allowed");
         ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a scheduler is not allowed");
-        handlers = std::move(other.handlers);
+        swap(other);
         return *this;
         return *this;
     }
     }