Skip to content

Commit 528e9c5

Browse files
committed
Include/xrRender/FactoryPtr.h: make operator bool explicit
1 parent 75f99a7 commit 528e9c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Include/xrRender/FactoryPtr.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ class FactoryPtr
6464

6565
T& operator*() const { return *m_pObject; }
6666
T* operator->() const { return m_pObject; }
67-
operator bool() const { return m_pObject; }
67+
68+
[[nodiscard]]
69+
explicit operator bool() const { return m_pObject; }
70+
71+
[[nodiscard]]
6872
bool operator!() const { return m_pObject == nullptr; }
6973

7074
private:

0 commit comments

Comments
 (0)