Updated CallOnExit
Made it non copyable Made usage of std::function (thus allowing lambda to be used as functions) Former-commit-id: b56cb410bf94bdb3b73d73d7599059d613e41a68
This commit is contained in:
@@ -8,10 +8,12 @@
|
|||||||
#define NAZARA_CALLONEXIT_HPP
|
#define NAZARA_CALLONEXIT_HPP
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
|
#include <Nazara/Core/NonCopyable.hpp>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
class NzCallOnExit
|
class NzCallOnExit : NzNonCopyable
|
||||||
{
|
{
|
||||||
using Func = void (*)();
|
using Func = std::function<void()>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NzCallOnExit(Func func = nullptr);
|
NzCallOnExit(Func func = nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user