From 317cd0b19a284f9a7296fcb4e06d9b2362da8c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 6 Feb 2022 14:12:19 +0100 Subject: Refactor some object type checking code with `cast_to` Less stringly typed logic, and less String allocations and comparisons. --- modules/gdnative/nativescript/nativescript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdnative/nativescript/nativescript.cpp') diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index be304a43f0..5d5414c694 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -766,7 +766,7 @@ Variant NativeScriptInstance::call(const StringName &p_method, const Variant **p void NativeScriptInstance::notification(int p_notification) { #ifdef DEBUG_ENABLED if (p_notification == MainLoop::NOTIFICATION_CRASH) { - if (current_method_call != StringName("")) { + if (current_method_call != StringName()) { ERR_PRINT("NativeScriptInstance detected crash on method: " + current_method_call); current_method_call = ""; } -- cgit v1.2.3