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/Strong.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'Source/JavaScriptCore/heap/Strong.h') diff --git a/Source/JavaScriptCore/heap/Strong.h b/Source/JavaScriptCore/heap/Strong.h index 27ab5d31f..264c24e25 100644 --- a/Source/JavaScriptCore/heap/Strong.h +++ b/Source/JavaScriptCore/heap/Strong.h @@ -23,8 +23,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Strong_h -#define Strong_h +#pragma once #include #include "Handle.h" @@ -84,9 +83,7 @@ public: bool operator!() const { return !slot() || !*slot(); } - // This conversion operator allows implicit conversion to bool but not to other integer types. - typedef JSValue (HandleBase::*UnspecifiedBoolType); - operator UnspecifiedBoolType*() const { return !!*this ? reinterpret_cast(1) : 0; } + explicit operator bool() const { return !!*this; } void swap(Strong& other) { @@ -154,6 +151,4 @@ template struct VectorTraits> : SimpleClassVectorTrai template struct HashTraits> : SimpleClassHashTraits> { }; -} - -#endif // Strong_h +} // namespace WTF -- cgit v1.2.1