mirror of https://github.com/Icinga/icinga2.git
Defer: Allow empty initialization & add `SetFunc()` method
This commit is contained in:
parent
73db30c08b
commit
a5a83e311a
|
@ -22,6 +22,8 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Defer() = default;
|
||||
|
||||
Defer(const Defer&) = delete;
|
||||
Defer(Defer&&) = delete;
|
||||
Defer& operator=(const Defer&) = delete;
|
||||
|
@ -39,6 +41,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline void SetFunc(std::function<void()> func)
|
||||
{
|
||||
m_Func = std::move(func);
|
||||
}
|
||||
|
||||
inline
|
||||
void Cancel()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue