mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
AK: Let FlyStrings be assigned from Strings
This commit is contained in:
parent
abc01cc9fe
commit
a35fa553dd
Notes:
sideshowbarker
2024-07-17 03:05:16 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/a35fa553dd Pull-request: https://github.com/SerenityOS/serenity/pull/17478 Reviewed-by: https://github.com/trflynn89 ✅
@ -53,6 +53,12 @@ FlyString::FlyString(String const& string)
|
||||
String::ref_fly_string_data({}, m_data);
|
||||
}
|
||||
|
||||
FlyString& FlyString::operator=(String const& string)
|
||||
{
|
||||
*this = FlyString { string };
|
||||
return *this;
|
||||
}
|
||||
|
||||
FlyString::FlyString(FlyString const& other)
|
||||
: m_data(other.m_data)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@ public:
|
||||
|
||||
static ErrorOr<FlyString> from_utf8(StringView);
|
||||
explicit FlyString(String const&);
|
||||
FlyString& operator=(String const&);
|
||||
|
||||
FlyString(FlyString const&);
|
||||
FlyString& operator=(FlyString const&);
|
||||
|
Loading…
Reference in New Issue
Block a user