From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/heap/Handle.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'Source/JavaScriptCore/heap/Handle.h') diff --git a/Source/JavaScriptCore/heap/Handle.h b/Source/JavaScriptCore/heap/Handle.h index 28ac30cd9..ba4161c25 100644 --- a/Source/JavaScriptCore/heap/Handle.h +++ b/Source/JavaScriptCore/heap/Handle.h @@ -23,8 +23,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Handle_h -#define Handle_h +#pragma once #include "HandleTypes.h" @@ -52,9 +51,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(1) : 0; } + explicit operator bool() const { return m_slot && *m_slot; } HandleSlot slot() const { return m_slot; } @@ -184,6 +181,4 @@ template inline bool operator!=(JSValue a, const Handle return a != b.get(); } -} - -#endif +} // namespace JSC -- cgit v1.2.1