Changeset 95090 in webkit


Ignore:
Timestamp:
Sep 14, 2011 7:20:45 AM (13 years ago)
Author:
steveblock@google.com
Message:

HashTraits.h should include template specialization for WTF::String
https://bugs.webkit.org/show_bug.cgi?id=67851

Ensure that the template specialization for HashTraits<String> is always
picked up. (Previously it was possible to include HashSet and String but
not the correct HashTraits, so you would get an inefficient template
instantiation.)

Patch by Iain Merrick <husky@google.com> on 2011-09-14
Reviewed by Darin Adler.

  • wtf/HashTraits.h:
  • wtf/text/StringHash.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r95060 r95090  
     12011-09-14  Iain Merrick  <husky@google.com>
     2
     3        HashTraits.h should include template specialization for WTF::String
     4        https://bugs.webkit.org/show_bug.cgi?id=67851
     5
     6        Ensure that the template specialization for HashTraits<String> is always
     7        picked up. (Previously it was possible to include HashSet and String but
     8        not the correct HashTraits, so you would get an inefficient template
     9        instantiation.)
     10
     11        Reviewed by Darin Adler.
     12
     13        * wtf/HashTraits.h:
     14        * wtf/text/StringHash.h:
     15
    1162011-09-13  Filip Pizlo  <fpizlo@apple.com>
    217
  • trunk/Source/JavaScriptCore/wtf/HashTraits.h

    r93990 r95090  
    2828
    2929namespace WTF {
     30
     31    class String;
    3032
    3133    using std::pair;
     
    9092
    9193    template<typename P> struct HashTraits<RefPtr<P> > : SimpleClassHashTraits<RefPtr<P> > { };
     94    template<> struct HashTraits<String> : SimpleClassHashTraits<String> { };
    9295
    9396    // special traits for pairs, helpful for their use in HashMap implementation
  • trunk/Source/JavaScriptCore/wtf/text/StringHash.h

    r88355 r95090  
    180180    };
    181181
    182     template<> struct HashTraits<String> : SimpleClassHashTraits<String> { };
    183 
    184182}
    185183
Note: See TracChangeset for help on using the changeset viewer.