Bug 1725572 - Part 1: Support move-only closures in ScopeExit, r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D125895
This commit is contained in:
@@ -93,7 +93,7 @@ class MOZ_STACK_CLASS ScopeExit {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ScopeExit(ExitFunction&& cleanup)
|
explicit ScopeExit(ExitFunction&& cleanup)
|
||||||
: mExitFunction(cleanup), mExecuteOnDestruction(true) {}
|
: mExitFunction(std::move(cleanup)), mExecuteOnDestruction(true) {}
|
||||||
|
|
||||||
ScopeExit(ScopeExit&& rhs)
|
ScopeExit(ScopeExit&& rhs)
|
||||||
: mExitFunction(std::move(rhs.mExitFunction)),
|
: mExitFunction(std::move(rhs.mExitFunction)),
|
||||||
|
|||||||
Reference in New Issue
Block a user