summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-10-07 20:12:32 +0330
committerAndreas Kling <kling@serenityos.org>2021-10-08 12:25:24 +0200
commit6ab6321c2fa9d84c798a5f133811a76517953fe2 (patch)
treeb32705750f9c626c9b7b5cf1b607eb62680da6a4 /Userland
parent39baadcddfe8e54fea14994957d2b2a6edfa30ae (diff)
downloadserenity-6ab6321c2fa9d84c798a5f133811a76517953fe2.zip
LibJS: Remove redundant const_cast
The accessed field is mutable, so there's no need for this const_cast.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index 8eb93d3ded..3b9ca881fc 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -1017,7 +1017,7 @@ Reference Identifier::to_reference(Interpreter& interpreter, GlobalObject&) cons
}
auto reference = interpreter.vm().resolve_binding(string());
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;
}