mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
StringView: Make construction of String from a StringView containing a String cheaper
... at the cost of an additional pointer per view.
This commit is contained in:
committed by
Andreas Kling
parent
8fecc0eaee
commit
f9ba7adae2
@@ -4,7 +4,8 @@
|
||||
namespace AK {
|
||||
|
||||
StringView::StringView(const AK::String& string)
|
||||
: m_characters(string.characters())
|
||||
: m_string(&string)
|
||||
, m_characters(string.characters())
|
||||
, m_length(string.length())
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user