$NetBSD: patch-src_3rdparty_webkit_Source_JavaScriptCore_wtf_HashSet.h,v 1.1 2013/05/09 14:07:08 joerg Exp $ --- src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h.orig 2013-05-08 14:26:07.000000000 +0000 +++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h @@ -49,7 +49,7 @@ namespace WTF { HashFunctions, ValueTraits, ValueTraits> HashTableType; public: - typedef HashTableConstIteratorAdapter iterator; + typedef HashTableIteratorAdapter iterator; typedef HashTableConstIteratorAdapter const_iterator; void swap(HashSet&); @@ -58,10 +58,14 @@ namespace WTF { int capacity() const; bool isEmpty() const; - iterator begin() const; - iterator end() const; + iterator begin(); + iterator end(); - iterator find(const ValueType&) const; + const_iterator begin() const; + const_iterator end() const; + + iterator find(const ValueType&); + const_iterator find(const ValueType&) const; bool contains(const ValueType&) const; // An alternate version of find() that finds the object by hashing and comparing @@ -69,7 +73,8 @@ namespace WTF { // must have the following function members: // static unsigned hash(const T&); // static bool equal(const ValueType&, const T&); - template iterator find(const T&) const; + template iterator find(const T&); + template const_iterator find(const T&) const; template bool contains(const T&) const; // The return value is a pair of an interator to the new value's location, @@ -134,19 +139,37 @@ namespace WTF { } template - inline typename HashSet::iterator HashSet::begin() const + inline typename HashSet::iterator HashSet::begin() { return m_impl.begin(); } template - inline typename HashSet::iterator HashSet::end() const + inline typename HashSet::const_iterator HashSet::begin() const + { + return m_impl.begin(); + } + + template + inline typename HashSet::iterator HashSet::end() { return m_impl.end(); } template - inline typename HashSet::iterator HashSet::find(const ValueType& value) const + inline typename HashSet::const_iterator HashSet::end() const + { + return m_impl.end(); + } + + template + inline typename HashSet::iterator HashSet::find(const ValueType& value) + { + return m_impl.find(value); + } + + template + inline typename HashSet::const_iterator HashSet::find(const ValueType& value) const { return m_impl.find(value); } @@ -160,10 +183,21 @@ namespace WTF { template template typename HashSet::iterator + inline HashSet::find(const T& value) + { + typedef HashSetTranslatorAdapter Adapter; + return m_impl.template find(value); + + } + + template + template + typename HashSet::const_iterator inline HashSet::find(const T& value) const { typedef HashSetTranslatorAdapter Adapter; return m_impl.template find(value); + } template