Changeset 35227 in webkit for trunk/JavaScriptCore/kjs/ustring.cpp
- Timestamp:
- Jul 17, 2008, 2:11:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ustring.cpp
r35199 r35227 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 else 466 m_rep = Rep::create(c, length); 457 467 } 458 468 … … 521 531 } 522 532 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 537 533 const UString& UString::null() 538 534 {
Note:
See TracChangeset
for help on using the changeset viewer.