mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 18:58:56 +00:00
AK: Allow implicitly constructing a Utf16View from a Utf16FlyString
The same already works for String and FlyString into StringView, and for Utf16String into Utf16View.
This commit is contained in:
parent
1bc80848fb
commit
73154defa8
Notes:
github-actions[bot]
2025-08-07 00:07:27 +00:00
Author: https://github.com/trflynn89
Commit: 73154defa8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5746
Reviewed-by: https://github.com/gmta ✅
1 changed files with 3 additions and 0 deletions
|
@ -39,6 +39,9 @@ public:
|
|||
|
||||
ALWAYS_INLINE explicit operator Utf16String() const { return to_utf16_string(); }
|
||||
|
||||
ALWAYS_INLINE operator Utf16View() const& { return view(); }
|
||||
explicit operator Utf16View() const&& = delete;
|
||||
|
||||
ALWAYS_INLINE Utf16String to_utf16_string() const
|
||||
{
|
||||
Detail::Utf16StringBase copy { m_data };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue