mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibJS: Remove redundant const_cast
The accessed field is mutable, so there's no need for this const_cast.
This commit is contained in:
parent
39baadcddf
commit
6ab6321c2f
Notes:
sideshowbarker
2024-07-18 02:55:52 +09:00
Author: https://github.com/alimpfard
Commit: 6ab6321c2f
Pull-request: https://github.com/SerenityOS/serenity/pull/10390
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/davidot
1 changed files with 1 additions and 1 deletions
|
@ -1017,7 +1017,7 @@ Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject&) cons
|
||||||
}
|
}
|
||||||
auto reference = interpreter.vm().resolve_binding(string());
|
auto reference = interpreter.vm().resolve_binding(string());
|
||||||
if (reference.environment_coordinate().has_value())
|
if (reference.environment_coordinate().has_value())
|
||||||
const_cast<Identifier&>(*this).m_cached_environment_coordinate = reference.environment_coordinate();
|
m_cached_environment_coordinate = reference.environment_coordinate();
|
||||||
return reference;
|
return reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue