summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/wtf/PlatformRefPtr.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/wtf/PlatformRefPtr.h')
-rw-r--r--JavaScriptCore/wtf/PlatformRefPtr.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/JavaScriptCore/wtf/PlatformRefPtr.h b/JavaScriptCore/wtf/PlatformRefPtr.h
index f99ec9b..8ac16cb 100644
--- a/JavaScriptCore/wtf/PlatformRefPtr.h
+++ b/JavaScriptCore/wtf/PlatformRefPtr.h
@@ -62,8 +62,7 @@ public:
~PlatformRefPtr()
{
- T* ptr = m_ptr;
- if (ptr && ptr != hashTableDeletedValue())
+ if (T* ptr = m_ptr)
derefPlatformPtr(ptr);
}
@@ -71,7 +70,7 @@ public:
{
T* ptr = m_ptr;
m_ptr = 0;
- if (ptr && ptr != hashTableDeletedValue())
+ if (ptr)
derefPlatformPtr(ptr);
}
@@ -111,7 +110,7 @@ template <typename T> inline PlatformRefPtr<T>& PlatformRefPtr<T>::operator=(con
refPlatformPtr(optr);
T* ptr = m_ptr;
m_ptr = optr;
- if (ptr && ptr != hashTableDeletedValue())
+ if (ptr)
derefPlatformPtr(ptr);
return *this;
}
@@ -122,7 +121,7 @@ template <typename T> inline PlatformRefPtr<T>& PlatformRefPtr<T>::operator=(T*
if (optr)
refPlatformPtr(optr);
m_ptr = optr;
- if (ptr && ptr != hashTableDeletedValue())
+ if (ptr)
derefPlatformPtr(ptr);
return *this;
}