Changeset 48703 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Sep 23, 2009, 11:39:27 PM (16 years ago)
Author:
[email protected]
Message:

A piece of my last patch that I forgot.

Patch by Geoffrey Garen <[email protected]> on 2009-09-23

  • wtf/HashCountedSet.h:

(WTF::::clear): Added HashCountedSet::clear.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r48702 r48703  
     12009-09-23  Geoffrey Garen  <[email protected]>
     2
     3        A piece of my last patch that I forgot.
     4
     5        * wtf/HashCountedSet.h:
     6        (WTF::::clear): Added HashCountedSet::clear.
     7
    182009-09-24  Gabor Loki  <[email protected]>
    29
  • trunk/JavaScriptCore/wtf/HashCountedSet.h

    r44868 r48703  
    6565        void remove(iterator it);
    6666 
    67        void clear();
    68        
     67        // removes the value, regardless of its count
     68        void clear(iterator it);
     69        void clear(const ValueType& value);
     70
     71        // clears the whole set
     72        void clear();
     73
    6974    private:
    7075        ImplType m_impl;
     
    167172   
    168173    template<typename Value, typename HashFunctions, typename Traits>
     174    inline void HashCountedSet<Value, HashFunctions, Traits>::clear(const ValueType& value)
     175    {
     176        clear(find(value));
     177    }
     178   
     179    template<typename Value, typename HashFunctions, typename Traits>
     180    inline void HashCountedSet<Value, HashFunctions, Traits>::clear(iterator it)
     181    {
     182        if (it == end())
     183            return;
     184
     185        m_impl.remove(it);
     186    }
     187   
     188    template<typename Value, typename HashFunctions, typename Traits>
    169189    inline void HashCountedSet<Value, HashFunctions, Traits>::clear()
    170190    {
Note: See TracChangeset for help on using the changeset viewer.