Commit 620cafa3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

EventManager: Work around MSVC lack of defaulted move ctor/assignment operators

parent e5e07871
...@@ -143,8 +143,24 @@ public: ...@@ -143,8 +143,24 @@ public:
return *this; return *this;
} }
#if !defined(_MSC_VER) || _MSC_VER >= 1900
EventManager(EventManager&&) = default; EventManager(EventManager&&) = default;
EventManager& operator=(EventManager&&) = default; EventManager& operator=(EventManager&&) = default;
#else
EventManager(EventManager&& em)
: Internal( std::move( em ) )
, m_lambdas(std::move( em.m_lambdas ) )
{
}
EventManager& operator=(EventManager&& em)
{
if ( this == &em )
return *this;
Internal::operator=( std::move( em ) );
m_lambdas = std::move( em.m_lambdas );
}
#endif
using RegisteredEvent = EventHandlerBase*; using RegisteredEvent = EventHandlerBase*;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment