Kernel: Add operator bool() for WeakPtr
This commit is contained in:
parent
5b4acec4ca
commit
0c8e9fe095
|
@ -91,6 +91,8 @@ namespace BAN
|
||||||
|
|
||||||
bool valid() const { return m_link && m_link->valid(); }
|
bool valid() const { return m_link && m_link->valid(); }
|
||||||
|
|
||||||
|
operator bool() const { return valid(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WeakPtr(const RefPtr<WeakLink<T>>& link)
|
WeakPtr(const RefPtr<WeakLink<T>>& link)
|
||||||
: m_link(link)
|
: m_link(link)
|
||||||
|
|
Loading…
Reference in New Issue