mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +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
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…
Add table
Add a link
Reference in a new issue