mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add FlyString::from_fly_impl()
This allows you to create a FlyString directly from a known-fly StringImpl instance.
This commit is contained in:
parent
240d2f88d3
commit
cd12b182ca
Notes:
sideshowbarker
2024-07-18 12:18:21 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cd12b182ca5
1 changed files with 8 additions and 0 deletions
|
@ -28,6 +28,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
static FlyString from_fly_impl(NonnullRefPtr<StringImpl> impl)
|
||||
{
|
||||
VERIFY(impl->is_fly());
|
||||
FlyString string;
|
||||
string.m_impl = move(impl);
|
||||
return string;
|
||||
}
|
||||
|
||||
FlyString& operator=(const FlyString& other)
|
||||
{
|
||||
m_impl = other.m_impl;
|
||||
|
|
Loading…
Reference in a new issue