mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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…
x
Reference in New Issue
Block a user