mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibURL: Migrate Origin scheme from ByteString to String
This commit is contained in:
parent
7f7f6e490b
commit
2e64e0b836
Notes:
github-actions[bot]
2024-11-30 11:23:49 +00:00
Author: https://github.com/AtkinsSJ
Commit: 2e64e0b836
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2610
Reviewed-by: https://github.com/shannonbooth ✅
6 changed files with 10 additions and 13 deletions
|
@ -18,7 +18,7 @@ String Origin::serialize() const
|
|||
|
||||
// 2. Otherwise, let result be origin's scheme.
|
||||
StringBuilder result;
|
||||
result.append(scheme());
|
||||
result.append(scheme().value_or(String {}));
|
||||
|
||||
// 3. Append "://" to result.
|
||||
result.append("://"sv);
|
||||
|
@ -45,7 +45,7 @@ unsigned Traits<URL::Origin>::hash(URL::Origin const& origin)
|
|||
if (origin.is_opaque())
|
||||
return 0;
|
||||
|
||||
unsigned hash = origin.scheme().hash();
|
||||
unsigned hash = origin.scheme().value_or(String {}).hash();
|
||||
|
||||
if (origin.port().has_value())
|
||||
hash = pair_int_hash(hash, *origin.port());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue