mirror of
https://github.com/AxioDL/boo.git
synced 2025-06-30 18:33:35 +00:00
BooObject: Make ObjToken operator bool explicit
Makes explicit conversions to bool necessary to prevent error-prone conversions to bool.
This commit is contained in:
parent
2b63413369
commit
d973b12dcd
@ -69,7 +69,7 @@ public:
|
||||
T* cast() const noexcept {
|
||||
return static_cast<T*>(m_obj);
|
||||
}
|
||||
operator bool() const noexcept { return m_obj != nullptr; }
|
||||
explicit operator bool() const noexcept { return m_obj != nullptr; }
|
||||
void reset() noexcept {
|
||||
if (m_obj)
|
||||
m_obj->decrement();
|
||||
|
Loading…
x
Reference in New Issue
Block a user