diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-06-03 18:27:56 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-03 20:27:05 +0200 |
commit | f9ba7adae2efaa2e2bdc47a13ff22aed401261b3 (patch) | |
tree | 87e22463fdd5c5e14d2f4cf9ca7e2ada15815a56 /AK/StringView.h | |
parent | 8fecc0eaeeacf0b623f495258c32a785c67b0c32 (diff) | |
download | serenity-f9ba7adae2efaa2e2bdc47a13ff22aed401261b3.zip |
StringView: Make construction of String from a StringView containing a String cheaper
... at the cost of an additional pointer per view.
Diffstat (limited to 'AK/StringView.h')
-rw-r--r-- | AK/StringView.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/StringView.h b/AK/StringView.h index 4ef404c8e0..8e5b31127d 100644 --- a/AK/StringView.h +++ b/AK/StringView.h @@ -44,6 +44,8 @@ public: bool operator==(const String&) const; private: + friend class String; + const AK::String* m_string { nullptr }; const char* m_characters { nullptr }; int m_length { 0 }; }; |