Changeset 54789 in webkit for trunk/JavaScriptCore/runtime/UStringImpl.cpp
- Timestamp:
- Feb 15, 2010, 1:03:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/UStringImpl.cpp
r54743 r54789 51 51 } 52 52 53 PassRefPtr<UStringImpl> UStringImpl::create(const char* c, intlength)53 PassRefPtr<UStringImpl> UStringImpl::create(const char* c, unsigned length) 54 54 { 55 55 ASSERT(c); … … 60 60 UChar* d; 61 61 PassRefPtr<UStringImpl> result = UStringImpl::createUninitialized(length, d); 62 for ( inti = 0; i < length; i++)62 for (unsigned i = 0; i < length; i++) 63 63 d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend 64 64 return result; 65 65 } 66 66 67 PassRefPtr<UStringImpl> UStringImpl::create(const UChar* buffer, intlength)67 PassRefPtr<UStringImpl> UStringImpl::create(const UChar* buffer, unsigned length) 68 68 { 69 69 UChar* newBuffer;
Note:
See TracChangeset
for help on using the changeset viewer.