1
Fork 0
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:
Andreas Kling 2019-06-08 23:55:13 +02:00
parent 6a51093ab1
commit cdb44be703
3 changed files with 7 additions and 6 deletions

View file

@ -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());
}