Ignore:
Timestamp:
Apr 7, 2010, 9:35:06 PM (15 years ago)
Author:
[email protected]
Message:

Vector<UString> makes many needless calls to UString::UString and UString::~UString

Reviewed by Anders Carlsson.

Add a VectorTrait<UString> specialisation to allow vector to simply memset/memcpy
data around. Only difference from the VectorTrait<RefPtr<T> > traits is the inability
to use memset to initialize data.

  • runtime/UString.h:

(WTF::):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/UString.h

    r57055 r57248  
    651651
    652652    };
    653 
     653   
     654    template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits
     655    {
     656        static const bool canInitializeWithMemset = true;
     657    };
     658   
    654659} // namespace WTF
    655660
Note: See TracChangeset for help on using the changeset viewer.