summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/heap/Handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/heap/Handle.h')
-rw-r--r--Source/JavaScriptCore/heap/Handle.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/heap/Handle.h b/Source/JavaScriptCore/heap/Handle.h
index 28ac30cd9..c924e041d 100644
--- a/Source/JavaScriptCore/heap/Handle.h
+++ b/Source/JavaScriptCore/heap/Handle.h
@@ -52,9 +52,7 @@ class HandleBase {
public:
bool operator!() const { return !m_slot || !*m_slot; }
- // This conversion operator allows implicit conversion to bool but not to other integer types.
- typedef JSValue (HandleBase::*UnspecifiedBoolType);
- operator UnspecifiedBoolType*() const { return (m_slot && *m_slot) ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; }
+ explicit operator bool() const { return m_slot && *m_slot; }
HandleSlot slot() const { return m_slot; }