mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
Introduce Defer#operator bool()
This commit is contained in:
parent
951af1801e
commit
713930727f
@ -41,6 +41,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
operator bool() const noexcept
|
||||
{
|
||||
return (bool)m_Func;
|
||||
}
|
||||
|
||||
inline void SetFunc(std::function<void()> func)
|
||||
{
|
||||
m_Func = std::move(func);
|
||||
|
Loading…
x
Reference in New Issue
Block a user