Bug 853646 - part 0a - remove js::StripConst and use mozilla::RemoveConst instead; r=Waldo

This commit is contained in:
Nathan Froyd 2013-04-03 11:24:11 -04:00
parent 6713a93963
commit 27039b4cb4
2 changed files with 2 additions and 6 deletions

View File

@ -610,7 +610,7 @@ template <class T>
class HashTableEntry
{
template <class, class, class> friend class HashTable;
typedef typename tl::StripConst<T>::result NonConstT;
typedef typename mozilla::RemoveConst<T>::Type NonConstT;
HashNumber keyHash;
mozilla::AlignedStorage2<NonConstT> mem;
@ -677,7 +677,7 @@ class HashTableEntry
template <class T, class HashPolicy, class AllocPolicy>
class HashTable : private AllocPolicy
{
typedef typename tl::StripConst<T>::result NonConstT;
typedef typename mozilla::RemoveConst<T>::Type NonConstT;
typedef typename HashPolicy::KeyType Key;
typedef typename HashPolicy::Lookup Lookup;

View File

@ -104,10 +104,6 @@ template <class T> struct UnsafeRangeSizeMask {
static const size_t result = MulOverflowMask<2 * sizeof(T)>::result;
};
/* Return T stripped of any const-ness. */
template <class T> struct StripConst { typedef T result; };
template <class T> struct StripConst<const T> { typedef T result; };
template <bool cond, typename T, T v1, T v2> struct If { static const T result = v1; };
template <typename T, T v1, T v2> struct If<false, T, v1, v2> { static const T result = v2; };