From e28fd07b2bbe78db0f286604a6eb469d8a0664be Mon Sep 17 00:00:00 2001 From: Lightning_A Date: Thu, 17 Jun 2021 16:03:09 -0600 Subject: Rename `instance()`->`instantiate()` when it's a verb --- modules/gdnative/nativescript/api_generator.cpp | 2 +- modules/gdnative/nativescript/nativescript.cpp | 6 +++--- modules/gdnative/nativescript/nativescript.h | 2 +- modules/gdnative/nativescript/register_types.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/gdnative/nativescript') diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index 57717010f7..4f696f2a39 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -251,7 +251,7 @@ List generate_c_api_classes() { class_api.singleton_name = name; } } - class_api.is_instantiable = !class_api.is_singleton && ClassDB::can_instance(class_name); + class_api.is_instantiable = !class_api.is_singleton && ClassDB::can_instantiate(class_name); { List inheriters; diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index 0930302eb2..3695f6b9a3 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -170,7 +170,7 @@ String NativeScript::get_script_class_icon_path() const { return script_class_icon_path; } -bool NativeScript::can_instance() const { +bool NativeScript::can_instantiate() const { NativeScriptDesc *script_data = get_script_desc(); #ifdef TOOLS_ENABLED @@ -503,7 +503,7 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Callable::Cal Object *owner = nullptr; if (!(script_data->base_native_type == "")) { - owner = ClassDB::instance(script_data->base_native_type); + owner = ClassDB::instantiate(script_data->base_native_type); } else { owner = memnew(RefCounted); } @@ -1422,7 +1422,7 @@ void NativeScriptLanguage::init_library(const Ref &lib) { if (!E) { Ref gdn; - gdn.instance(); + gdn.instantiate(); gdn->set_library(lib); // TODO check the return value? diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index c53dc063b8..777a878660 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -137,7 +137,7 @@ public: void set_script_class_icon_path(String p_icon_path); String get_script_class_icon_path() const; - virtual bool can_instance() const override; + virtual bool can_instantiate() const override; virtual Ref