diff options
| author | Stefan Boberg <[email protected]> | 2021-08-09 21:06:07 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-08-09 21:06:07 +0200 |
| commit | 73885c99a1164de8275d85f70488b8a5186935b1 (patch) | |
| tree | 8a4728a33d5eda313a07d4437ea4a1ba23e6c16e | |
| parent | Changed naming scheme for lifecycle events. Always create shutdown events (no... (diff) | |
| download | zen-73885c99a1164de8275d85f70488b8a5186935b1.tar.xz zen-73885c99a1164de8275d85f70488b8a5186935b1.zip | |
Fixed Event move assignment
| -rw-r--r-- | zencore/include/zencore/thread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/include/zencore/thread.h b/zencore/include/zencore/thread.h index 4b5267a29..30d0c0897 100644 --- a/zencore/include/zencore/thread.h +++ b/zencore/include/zencore/thread.h @@ -78,8 +78,7 @@ public: inline Event& operator=(Event&& Rhs) { - m_EventHandle = Rhs.m_EventHandle; - Rhs.m_EventHandle = nullptr; + std::swap(m_EventHandle, Rhs.m_EventHandle); return *this; } @@ -135,6 +134,7 @@ public: ZENCORE_API bool IsValid() const; ZENCORE_API bool Wait(int TimeoutMs = -1); ZENCORE_API void Terminate(int ExitCode); + ZENCORE_API void Reset(); inline int Pid() const { return m_Pid; } private: |