summaryrefslogtreecommitdiffstats
path: root/src/classes/wrapped.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/wrapped.cpp')
-rw-r--r--src/classes/wrapped.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/classes/wrapped.cpp b/src/classes/wrapped.cpp
index fead050..ed57f44 100644
--- a/src/classes/wrapped.cpp
+++ b/src/classes/wrapped.cpp
@@ -43,17 +43,13 @@ const StringName *Wrapped::_get_extension_class_name() const {
void Wrapped::_postinitialize() {
const StringName *extension_class = _get_extension_class_name();
if (extension_class) {
- // TODO: replace C cast by a proper reinterpret_cast once `object_set_instance` signature correctly handles `const GDNativeStringNamePtr` param
- // (see: https://github.com/godotengine/godot/pull/67751)
- godot::internal::gdn_interface->object_set_instance(_owner, (GDNativeStringNamePtr)(extension_class), this);
+ godot::internal::gdn_interface->object_set_instance(_owner, reinterpret_cast<GDNativeConstStringNamePtr>(extension_class), this);
}
godot::internal::gdn_interface->object_set_instance_binding(_owner, godot::internal::token, this, _get_bindings_callbacks());
}
Wrapped::Wrapped(const StringName p_godot_class) {
- // TODO: replace C cast by a proper reinterpret_cast once `classdb_construct_object` signature correctly handles `const GDNativeStringNamePtr` param
- // (see: https://github.com/godotengine/godot/pull/67751)
- _owner = godot::internal::gdn_interface->classdb_construct_object((GDNativeStringNamePtr)(p_godot_class._native_ptr()));
+ _owner = godot::internal::gdn_interface->classdb_construct_object(reinterpret_cast<GDNativeConstStringNamePtr>(p_godot_class._native_ptr()));
}
Wrapped::Wrapped(GodotObject *p_godot_object) {