Changeset 35199 in webkit for trunk/JavaScriptCore/kjs/ustring.cpp
- Timestamp:
- Jul 16, 2008, 1:19:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ustring.cpp
r35177 r35199 455 455 else 456 456 m_rep = Rep::createCopying(c, length); 457 }458 459 UString::UString(UChar* c, int length, bool copy)460 {461 if (length == 0)462 m_rep = &Rep::empty;463 else if (copy)464 m_rep = Rep::createCopying(c, length);465 else466 m_rep = Rep::create(c, length);467 457 } 468 458 … … 531 521 } 532 522 523 UString UString::adopt(UChar* c, int length) 524 { 525 if (length == 0) 526 return UString(""); 527 return UString(Rep::create(c, length)); 528 } 529 530 UString UString::adopt(Vector<UChar>& buffer) 531 { 532 if (buffer.isEmpty()) 533 return UString(""); 534 return UString(Rep::create(buffer.releaseBuffer(), buffer.size())); 535 } 536 533 537 const UString& UString::null() 534 538 {
Note:
See TracChangeset
for help on using the changeset viewer.