diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-19 12:59:48 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-04 10:41:01 (GMT) |
commit | 91e4a472718039dc6d5c0a0d143be330e4c39020 (patch) | |
tree | 20393b39222f7e10f1ebb299c1a7406be6aa7701 /src | |
parent | ec0ce28dd0a0a6c67ffd5ef166978f0ec0f95894 (diff) | |
download | Qt-91e4a472718039dc6d5c0a0d143be330e4c39020.zip Qt-91e4a472718039dc6d5c0a0d143be330e4c39020.tar.gz Qt-91e4a472718039dc6d5c0a0d143be330e4c39020.tar.bz2 |
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<WTF::HashTableIterator<WTF::RefPtr<JSC::UString::Rep>, std::pair<WTF::RefPtr<JSC::UString::Rep>, StaticValueEntry*>, WTF::PairFirstExtractor<std::pair<WTF::RefPtr<JSC::UString::Rep>, StaticValueEntry*>>, WTF::StrHash<WTF::RefPtr<JSC::UString::Rep>>, WTF::PairHashTraits<WTF::HashTraits<WTF::RefPtr<JSC::UString::Rep>>, WTF::HashTraits<StaticValueEntry*>>, WTF::HashTraits<WTF::RefPtr<JSC::UString::Rep>>>, bool> to initialize std::pair<WTF::HashTableIteratorAdapter<WTF::HashTable<WTF::RefPtr<JSC::UString::Rep>, std::pair<WTF::RefPtr<JSC::UString::Rep>, StaticValueEntry*>, WTF::PairFirstExtractor<std::pair<WTF::RefPtr<JSC::UString::Rep>, StaticValueEntry*>>, WTF::StrHash<WTF::RefPtr<JSC::UString::Rep>>, WTF::PairHashTraits<WTF::HashTraits<WTF::RefPtr<JSC::UString::Rep>>, WTF::HashTraits<StaticValueEntry*>>, WTF::HashTraits<WTF::RefPtr<JSC::UString::Rep>>>, std::pair<WTF::RefPtr<JSC::UString::Rep>, StaticValueEntry*>>, bool>.
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h | 5 | ||||
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h | 10 | ||||
-rw-r--r-- | 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<T, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) { typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType; - return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); + pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); + typename HashMap<T, U, V, W, X>::iterator temp = p.first; + return make_pair<typename HashMap<T, U, V, W, X>::iterator, bool>(temp, p.second); +// return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> 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<typename T, typename U, typename V> pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value) { - return m_impl.add(value); + pair<typename HashTable<T, T, IdentityExtractor<T>, U, V, V>::iterator, bool> p = m_impl.add(value); + typename HashSet<T, U, V>::iterator temp = p.first; + pair<typename HashSet<T, U, V>::iterator, bool> p2 = make_pair<typename HashSet<T, U, V>::iterator, bool>(temp, p.second); + // p2.first = p.first; + // p2.second = p.second; + return p2; } template<typename Value, typename HashFunctions, typename Traits> @@ -213,7 +218,8 @@ namespace WTF { HashSet<Value, HashFunctions, Traits>::add(const T& value) { typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; - return m_impl.template addPassingHashCode<T, T, Adapter>(value, value); + pair<typename HashTableType::iterator, bool> p = m_impl.template addPassingHashCode<T, T, Adapter>(value, value); + return make_pair<iterator, bool>(p.first, p.second); } template<typename T, typename U, typename V> 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<RefPtr<T>, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) { typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType; - return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); + pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); +// typename HashMap<RefPtr<T>, U, V, W, X>::iterator temp = p.first; + return make_pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool>( + typename HashMap<RefPtr<T>, U, V, W, X>::iterator(p.first), p.second); + +// return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> inline pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool> HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(RawKeyType key, const MappedType& mapped) { - return m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped); + pair<typename HashTableType::iterator, bool> p = m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped); + return make_pair<typename HashMap<RefPtr<T>, U, V, W, X>::iterator, bool>( + typename HashMap<RefPtr<T>, U, V, W, X>::iterator(p.first), p.second); + + // return m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> |