mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
Userland: Replace VERIFY(is<T>) with verify_cast<T>
Instead of doing a VERIFY(is<T>(x)) and *then* casting it to T, we can just do the cast right away with verify_cast<T>. :^)
This commit is contained in:
parent
7fef8c5648
commit
e59bf87374
10 changed files with 26 additions and 43 deletions
|
@ -200,8 +200,7 @@ Value Interpreter::execute_statement(GlobalObject& global_object, const Statemen
|
|||
|
||||
FunctionEnvironmentRecord* Interpreter::current_function_environment_record()
|
||||
{
|
||||
VERIFY(is<FunctionEnvironmentRecord>(vm().running_execution_context().lexical_environment));
|
||||
return static_cast<FunctionEnvironmentRecord*>(vm().running_execution_context().lexical_environment);
|
||||
return verify_cast<FunctionEnvironmentRecord>(vm().running_execution_context().lexical_environment);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue