mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
AK: Ensure Utf16FlyString is hash-compatible with Utf16View/Utf16String
This commit is contained in:
parent
274f8ee462
commit
1b611fba67
Notes:
github-actions[bot]
2025-08-07 00:07:15 +00:00
Author: https://github.com/trflynn89
Commit: 1b611fba67
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5746
Reviewed-by: https://github.com/gmta ✅
3 changed files with 25 additions and 0 deletions
|
|
@ -8,6 +8,12 @@
|
|||
|
||||
#include <AK/Utf16FlyString.h>
|
||||
|
||||
static_assert(AK::Concepts::HashCompatible<Utf16String, Utf16FlyString>);
|
||||
static_assert(AK::Concepts::HashCompatible<Utf16FlyString, Utf16String>);
|
||||
|
||||
static_assert(AK::Concepts::HashCompatible<Utf16View, Utf16FlyString>);
|
||||
static_assert(AK::Concepts::HashCompatible<Utf16FlyString, Utf16View>);
|
||||
|
||||
TEST_CASE(empty_string)
|
||||
{
|
||||
Utf16FlyString fly {};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@
|
|||
#include <AK/Utf16String.h>
|
||||
#include <AK/Utf32View.h>
|
||||
|
||||
static_assert(AK::Concepts::HashCompatible<Utf16String, Utf16View>);
|
||||
static_assert(AK::Concepts::HashCompatible<Utf16View, Utf16String>);
|
||||
|
||||
static Utf16String make_copy(Utf16String const& string)
|
||||
{
|
||||
return string.has_ascii_storage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue