Core: Remove NonCopyable
Former-commit-id: f8c6d10ad0b1abb4a32e3c867b7f24fd4bde68a4
This commit is contained in:
@@ -8,20 +8,24 @@
|
||||
#define NAZARA_CALLONEXIT_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/NonCopyable.hpp>
|
||||
#include <functional>
|
||||
|
||||
class NzCallOnExit : NzNonCopyable
|
||||
class NzCallOnExit
|
||||
{
|
||||
using Func = std::function<void()>;
|
||||
|
||||
public:
|
||||
NzCallOnExit(Func func = nullptr);
|
||||
NzCallOnExit(const NzCallOnExit&) = delete;
|
||||
NzCallOnExit(NzCallOnExit&&) = delete;
|
||||
~NzCallOnExit();
|
||||
|
||||
void CallAndReset(Func func = nullptr);
|
||||
void Reset(Func func = nullptr);
|
||||
|
||||
NzCallOnExit& operator=(const NzCallOnExit&) = delete;
|
||||
NzCallOnExit& operator=(NzCallOnExit&&) = default;
|
||||
|
||||
private:
|
||||
Func m_func;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user