mirror of https://github.com/hyprwm/Hyprland
11 lines
165 B
C++
11 lines
165 B
C++
|
#include "ScopeGuard.hpp"
|
||
|
|
||
|
CScopeGuard::CScopeGuard(const std::function<void()>& fn_) : fn(fn_) {
|
||
|
;
|
||
|
}
|
||
|
|
||
|
CScopeGuard::~CScopeGuard() {
|
||
|
if (fn)
|
||
|
fn();
|
||
|
}
|