scheduler: swap based move assignment operator

This commit is contained in:
Michele Caini
2024-09-06 15:25:48 +02:00
parent 3b4864aeae
commit 63d6db37d8

View File

@@ -145,7 +145,7 @@ public:
*/
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");
handlers = std::move(other.handlers);
swap(other);
return *this;
}