mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 14:42:51 +00:00
LibWeb: Const qualify many functions in EnvironmentSettingsObject
Which also allows us to remove a const_cast :^)
This commit is contained in:
parent
473bebc9a8
commit
617b8eed75
Notes:
github-actions[bot]
2024-11-23 15:45:03 +00:00
Author: https://github.com/shannonbooth
Commit: 617b8eed75
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2518
7 changed files with 30 additions and 32 deletions
Libraries/LibWeb/StorageAPI
|
@ -32,9 +32,7 @@ StorageKey obtain_a_storage_key_for_non_storage_purposes(HTML::Environment const
|
|||
// 1. Let origin be environment’s origin if environment is an environment settings object; otherwise environment’s creation URL’s origin.
|
||||
if (is<HTML::EnvironmentSettingsObject>(environment)) {
|
||||
auto const& settings = static_cast<HTML::EnvironmentSettingsObject const&>(environment);
|
||||
// FIXME: EnvironmentSettingsObject::origin() should be const :|
|
||||
auto& mutable_settings = const_cast<HTML::EnvironmentSettingsObject&>(settings);
|
||||
return { mutable_settings.origin() };
|
||||
return { settings.origin() };
|
||||
}
|
||||
return { environment.creation_url.origin() };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue