mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Common/ScopeGuard: Fix move constructor.
This commit is contained in:
parent
bd07d9dfd3
commit
1b63776f2d
@ -13,10 +13,7 @@ class ScopeGuard final
|
||||
public:
|
||||
ScopeGuard(Callable&& finalizer) : m_finalizer(std::forward<Callable>(finalizer)) {}
|
||||
|
||||
ScopeGuard(ScopeGuard&& other) : m_finalizer(std::move(other.m_finalizer))
|
||||
{
|
||||
other.m_finalizer = nullptr;
|
||||
}
|
||||
ScopeGuard(ScopeGuard&& other) : m_finalizer(std::move(other.m_finalizer)) { other.Dismiss(); }
|
||||
|
||||
~ScopeGuard() { Exit(); }
|
||||
void Dismiss() { m_finalizer.reset(); }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user