Kernel: Add operator bool() for WeakPtr

This commit is contained in:
Bananymous 2024-02-08 02:26:46 +02:00
parent 5b4acec4ca
commit 0c8e9fe095
1 changed files with 2 additions and 0 deletions

View File

@ -91,6 +91,8 @@ namespace BAN
bool valid() const { return m_link && m_link->valid(); }
operator bool() const { return valid(); }
private:
WeakPtr(const RefPtr<WeakLink<T>>& link)
: m_link(link)