mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
StringView: Store a StringImpl* rather than a String*.
This commit is contained in:
parent
6a51093ab1
commit
cdb44be703
3 changed files with 7 additions and 6 deletions
|
@ -38,8 +38,8 @@ public:
|
|||
|
||||
String(const StringView& view)
|
||||
{
|
||||
if (view.m_string)
|
||||
*this = String(*view.m_string);
|
||||
if (view.m_impl)
|
||||
m_impl = *view.m_impl;
|
||||
else
|
||||
m_impl = StringImpl::create(view.characters(), view.length());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue