magpie/utils/finalaction.cpp

14 lines
267 B
C++
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "finalaction.h"
FinalAction::FinalAction(const std::function<void()>& action):
action(action)
{}
FinalAction::~FinalAction() {
action();
}