From 91e4a472718039dc6d5c0a0d143be330e4c39020 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 19 Jul 2009 14:59:48 +0200 Subject: Fix compilation with Sun CC 5.9: the default constructor for HashTableIteratorAdapter isn't called. "../JavaScriptCore/wtf/RefPtrHashMap.h", line 208: Error: Cannot use std::pair, std::pair, StaticValueEntry*>, WTF::PairFirstExtractor, StaticValueEntry*>>, WTF::StrHash>, WTF::PairHashTraits>, WTF::HashTraits>, WTF::HashTraits>>, bool> to initialize std::pair, std::pair, StaticValueEntry*>, WTF::PairFirstExtractor, StaticValueEntry*>>, WTF::StrHash>, WTF::PairHashTraits>, WTF::HashTraits>, WTF::HashTraits>>, std::pair, StaticValueEntry*>>, bool>. --- src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h | 5 ++++- src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h | 10 ++++++++-- src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h | 13 +++++++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h index 3de5ee6..8ff9170 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h @@ -178,7 +178,10 @@ namespace WTF { HashMap::inlineAdd(const KeyType& key, const MappedType& mapped) { typedef HashMapTranslator TranslatorType; - return m_impl.template add(key, mapped); + pair p = m_impl.template add(key, mapped); + typename HashMap::iterator temp = p.first; + return make_pair::iterator, bool>(temp, p.second); +// return m_impl.template add(key, mapped); } template diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h index 990670d..ec809e5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h @@ -204,7 +204,12 @@ namespace WTF { template pair::iterator, bool> HashSet::add(const ValueType& value) { - return m_impl.add(value); + pair, U, V, V>::iterator, bool> p = m_impl.add(value); + typename HashSet::iterator temp = p.first; + pair::iterator, bool> p2 = make_pair::iterator, bool>(temp, p.second); + // p2.first = p.first; + // p2.second = p.second; + return p2; } template @@ -213,7 +218,8 @@ namespace WTF { HashSet::add(const T& value) { typedef HashSetTranslatorAdapter Adapter; - return m_impl.template addPassingHashCode(value, value); + pair p = m_impl.template addPassingHashCode(value, value); + return make_pair(p.first, p.second); } template diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h index 1cbebb4..08f1619 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h @@ -205,14 +205,23 @@ namespace WTF { HashMap, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) { typedef HashMapTranslator TranslatorType; - return m_impl.template add(key, mapped); + pair p = m_impl.template add(key, mapped); +// typename HashMap, U, V, W, X>::iterator temp = p.first; + return make_pair, U, V, W, X>::iterator, bool>( + typename HashMap, U, V, W, X>::iterator(p.first), p.second); + +// return m_impl.template add(key, mapped); } template inline pair, U, V, W, X>::iterator, bool> HashMap, U, V, W, X>::inlineAdd(RawKeyType key, const MappedType& mapped) { - return m_impl.template add(key, mapped); + pair p = m_impl.template add(key, mapped); + return make_pair, U, V, W, X>::iterator, bool>( + typename HashMap, U, V, W, X>::iterator(p.first), p.second); + + // return m_impl.template add(key, mapped); } template -- cgit v0.12