mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
AK: Don't implicitly convert Optional<T&> to Optional<T>
C++ will jovially select the implicit conversion operator, even if it's complete bogus, such as for unknown-size types or non-destructible types. Therefore, all such conversions (which incur a copy) must (unfortunately) be explicit so that non-copyable types continue to work. NOTE: We make an exception for trivially copyable types, since they are, well, trivially copyable. Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
This commit is contained in:
committed by
Ali Mohammad Pur
parent
8468fb9ae5
commit
d7596a0a61
Notes:
github-actions[bot]
2024-12-04 00:59:23 +00:00
Author: https://github.com/yyny Commit: https://github.com/LadybirdBrowser/ladybird/commit/d7596a0a61e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2567 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/gmta ✅
@@ -98,6 +98,6 @@ bool host_is_domain(URL::Host const&);
|
||||
void strip_trailing_spaces_from_an_opaque_path(DOMURL& url);
|
||||
|
||||
// https://url.spec.whatwg.org/#concept-url-parser
|
||||
URL::URL parse(StringView input, Optional<URL::URL> const& base_url = {}, Optional<StringView> encoding = {});
|
||||
URL::URL parse(StringView input, Optional<URL::URL const&> base_url = {}, Optional<StringView> encoding = {});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user