summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-18 20:13:50 +0200
committerGitHub <noreply@github.com>2021-08-18 20:13:50 +0200
commitde7b6d13ebd48b2ce6f3da21124d843cb35e7c54 (patch)
tree17c3590c4433deb6030554c9bdb26d3750f61781 /modules/gdnative
parenta619a92e3c7d051d5ac9fe49e1fb0a12db72983c (diff)
parent5161c97c9c7d6c1f6e4d0264fd9a9d9ea7f7be27 (diff)
Merge pull request #51627 from mhilbrunner/todo-for-neikeq
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index df0f29277e..2d9b45cb07 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/modules/gdnative/nativescript/api_generator.cpp
@@ -242,13 +242,9 @@ List<ClassAPI> generate_c_api_classes() {
class_api.class_name = class_name;
class_api.super_class_name = ClassDB::get_parent_class(class_name);
{
- String name = class_name;
- if (name.begins_with("_")) {
- name.remove(0);
- }
- class_api.is_singleton = Engine::get_singleton()->has_singleton(name);
+ class_api.is_singleton = Engine::get_singleton()->has_singleton(class_name);
if (class_api.is_singleton) {
- class_api.singleton_name = name;
+ class_api.singleton_name = class_name;
}
}
class_api.is_instantiable = !class_api.is_singleton && ClassDB::can_instantiate(class_name);