Return back ScopeExit usage.
This commit is contained in:
parent
c1a16acd53
commit
1b92e2d57a
@ -25,7 +25,7 @@ template <int id>
|
||||
static FileFd &get_file_fd() {
|
||||
static FileFd result = FileFd::from_native_fd(NativeFd(id, true));
|
||||
static ExitGuard exit_guard;
|
||||
static auto guard = SCOPE_EXIT {
|
||||
static auto guard = ScopeExit() + [&] {
|
||||
result.move_as_native_fd().release();
|
||||
};
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user