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/VectorTraits.h

    r39556 r40399  
    2323
    2424#include "RefPtr.h"
     25#include "TypeTraits.h"
    2526#include <utility>
    2627#include <memory>
     
    2930
    3031namespace WTF {
    31 
    32     template <typename T> struct IsPod           { static const bool value = false; };
    33     template <> struct IsPod<bool>               { static const bool value = true; };
    34     template <> struct IsPod<char>               { static const bool value = true; };
    35     template <> struct IsPod<signed char>        { static const bool value = true; };
    36     template <> struct IsPod<unsigned char>      { static const bool value = true; };
    37     template <> struct IsPod<short>              { static const bool value = true; };
    38     template <> struct IsPod<unsigned short>     { static const bool value = true; };
    39     template <> struct IsPod<int>                { static const bool value = true; };
    40     template <> struct IsPod<unsigned int>       { static const bool value = true; };
    41     template <> struct IsPod<long>               { static const bool value = true; };
    42     template <> struct IsPod<unsigned long>      { static const bool value = true; };
    43     template <> struct IsPod<long long>          { static const bool value = true; };
    44     template <> struct IsPod<unsigned long long> { static const bool value = true; };
    45     template <> struct IsPod<float>              { static const bool value = true; };
    46     template <> struct IsPod<double>             { static const bool value = true; };
    47     template <> struct IsPod<long double>        { static const bool value = true; };
    48     template <typename P> struct IsPod<P *>      { static const bool value = true; };
    4932
    5033    template<bool isPod, typename T>
Note: See TracChangeset for help on using the changeset viewer.