diff options
Diffstat (limited to 'core/extension/native_extension.cpp')
-rw-r--r-- | core/extension/native_extension.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 1a39c937e8..34a11758f8 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -112,7 +112,7 @@ public: static GDNativeInterface gdnative_interface; void NativeExtension::_register_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!String(class_name).is_valid_identifier(), "Attempt to register extension class '" + class_name + "', which is not a valid class identifier."); @@ -163,7 +163,7 @@ void NativeExtension::_register_extension_class(const GDNativeExtensionClassLibr ClassDB::register_extension_class(&extension->native_extension); } void NativeExtension::_register_extension_class_method(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; StringName method_name = p_method_info->name; @@ -177,7 +177,7 @@ void NativeExtension::_register_extension_class_method(const GDNativeExtensionCl ClassDB::bind_method_custom(class_name, method); } void NativeExtension::_register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_enum_name, const char *p_constant_name, GDNativeInt p_constant_value) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension constant '" + String(p_constant_name) + "' for unexisting class '" + class_name + "'."); @@ -188,7 +188,7 @@ void NativeExtension::_register_extension_class_integer_constant(const GDNativeE } void NativeExtension::_register_extension_class_property(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativePropertyInfo *p_info, const char *p_setter, const char *p_getter) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class property '" + String(p_info->name) + "' for unexisting class '" + class_name + "'."); @@ -206,7 +206,7 @@ void NativeExtension::_register_extension_class_property(const GDNativeExtension } void NativeExtension::_register_extension_class_property_group(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_group_name, const char *p_prefix) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class property group '" + String(p_group_name) + "' for unexisting class '" + class_name + "'."); @@ -215,7 +215,7 @@ void NativeExtension::_register_extension_class_property_group(const GDNativeExt } void NativeExtension::_register_extension_class_property_subgroup(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_subgroup_name, const char *p_prefix) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class property subgroup '" + String(p_subgroup_name) + "' for unexisting class '" + class_name + "'."); @@ -224,7 +224,7 @@ void NativeExtension::_register_extension_class_property_subgroup(const GDNative } void NativeExtension::_register_extension_class_signal(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class signal '" + String(p_signal_name) + "' for unexisting class '" + class_name + "'."); @@ -245,7 +245,7 @@ void NativeExtension::_register_extension_class_signal(const GDNativeExtensionCl } void NativeExtension::_unregister_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name) { - NativeExtension *self = (NativeExtension *)p_library; + NativeExtension *self = static_cast<NativeExtension *>(p_library); StringName class_name = p_class_name; ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to unregister unexisting extension class '" + class_name + "'."); |