From a6367c06881de267e80e2d55e5af318b3a25c98f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 6 Mar 2020 21:42:03 -0500 Subject: [PATCH] CToken: Make operator bool explicit Prevents potential error-prone conversions from occurring --- Runtime/CToken.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/CToken.hpp b/Runtime/CToken.hpp index 906786aa1..699f3c1ec 100644 --- a/Runtime/CToken.hpp +++ b/Runtime/CToken.hpp @@ -74,7 +74,7 @@ class CToken { public: /* Added to test for non-null state */ - operator bool() const { return x0_objRef != nullptr; } + explicit operator bool() const { return x0_objRef != nullptr; } void Unlock(); void Lock(); bool IsLocked() const { return x4_lockHeld; }