From 194bdde94787227e8f53a4e3273c192ab70b03ac Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:52:26 +0200 Subject: Cleanup of raw `nullptr` checks with `Ref` Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc. --- modules/gdscript/gdscript_lambda_callable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gdscript/gdscript_lambda_callable.cpp') diff --git a/modules/gdscript/gdscript_lambda_callable.cpp b/modules/gdscript/gdscript_lambda_callable.cpp index 2162a727b3..2de5811bca 100644 --- a/modules/gdscript/gdscript_lambda_callable.cpp +++ b/modules/gdscript/gdscript_lambda_callable.cpp @@ -150,7 +150,7 @@ void GDScriptLambdaCallable::call(const Variant **p_arguments, int p_argcount, V GDScriptLambdaCallable::GDScriptLambdaCallable(Ref p_script, GDScriptFunction *p_function, const Vector &p_captures) : function(p_function) { - ERR_FAIL_NULL(p_script.ptr()); + ERR_FAIL_COND(p_script.is_null()); ERR_FAIL_NULL(p_function); script = p_script; captures = p_captures; @@ -282,7 +282,7 @@ void GDScriptLambdaSelfCallable::call(const Variant **p_arguments, int p_argcoun GDScriptLambdaSelfCallable::GDScriptLambdaSelfCallable(Ref p_self, GDScriptFunction *p_function, const Vector &p_captures) : function(p_function) { - ERR_FAIL_NULL(p_self.ptr()); + ERR_FAIL_COND(p_self.is_null()); ERR_FAIL_NULL(p_function); reference = p_self; object = p_self.ptr(); -- cgit v1.2.3