Ignore:
Timestamp:
Jan 30, 2009, 12:34:14 AM (16 years ago)
Author:
[email protected]
Message:

2009-01-30 David Levin <[email protected]>

Reviewed by Alexey Proskuryakov.

Bug 23616: Various "template helpers" should be consolidated from isolated files in JavaScriptCore.
<https://bugs.webkit.org/show_bug.cgi?id=23616>

  • wtf/TypeTraits.h: Moved RemovePointer, IsPod, IsInteger to this file.
  • wtf/OwnPtr.h: Use RemovePointer from TypeTraits.h.
  • wtf/RetainPtr.h: Ditto.
  • wtf/HashTraits.h: Use IsInteger from TypeTraits.h.
  • wtf/VectorTraits.h: Use IsPod from TypeTraits.h.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/RetainPtr.h

    r39556 r40399  
    2222#define RetainPtr_h
    2323
     24#include "TypeTraits.h"
    2425#include <algorithm>
    2526#include <CoreFoundation/CoreFoundation.h>
     
    3031
    3132namespace WTF {
    32 
    33     template <typename T> struct RemovePointer {
    34         typedef T type;
    35     };
    36 
    37     template <typename T> struct RemovePointer<T*> {
    38         typedef T type;
    39     };
    4033
    4134    // Unlike most most of our smart pointers, RetainPtr can take either the pointer type or the pointed-to type,
     
    5750    template <typename T> class RetainPtr {
    5851    public:
    59         typedef typename RemovePointer<T>::type ValueType;
     52        typedef typename RemovePointer<T>::Type ValueType;
    6053        typedef ValueType* PtrType;
    6154
Note: See TracChangeset for help on using the changeset viewer.