diff --git a/include/godot_cpp/classes/ref.hpp b/include/godot_cpp/classes/ref.hpp index 137b677bf..569cdfa0d 100644 --- a/include/godot_cpp/classes/ref.hpp +++ b/include/godot_cpp/classes/ref.hpp @@ -219,7 +219,7 @@ class Ref { // Used exclusively in the bindings to recreate the Ref Godot encapsulates in return values, // without adding to the refcount. - inline static Ref _gde_internal_constructor(Object *obj) { + static Ref _gde_internal_constructor(Object *obj) { Ref r; r.reference = (T *)obj; return r; diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 0ffd783f3..6fdc54655 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -77,7 +77,7 @@ class Wrapped { GDExtensionObjectPtr owner; RecreateInstance *next; }; - inline static RecreateInstance *recreate_instance = nullptr; + static RecreateInstance *recreate_instance; #endif void _notification(int p_what) {} @@ -408,7 +408,7 @@ protected: // Don't use this for your classes, use GDCLASS() instead. #define GDEXTENSION_CLASS_ALIAS(m_class, m_alias_for, m_inherits) /******************************************************************************************************************/ \ private: \ - inline static ::godot::internal::EngineClassRegistration _gde_engine_class_registration_helper; \ + static ::godot::internal::EngineClassRegistration _gde_engine_class_registration_helper; \ void operator=(const m_class &p_rval) {} \ friend class ::godot::ClassDB; \ friend class ::godot::Wrapped; \ diff --git a/src/classes/wrapped.cpp b/src/classes/wrapped.cpp index ffca4f974..a5e87bc50 100644 --- a/src/classes/wrapped.cpp +++ b/src/classes/wrapped.cpp @@ -42,6 +42,10 @@ namespace godot { thread_local const StringName *Wrapped::_constructing_extension_class_name = nullptr; thread_local const GDExtensionInstanceBindingCallbacks *Wrapped::_constructing_class_binding_callbacks = nullptr; +#ifdef HOT_RELOAD_ENABLED +Wrapped::RecreateInstance *Wrapped::recreate_instance = nullptr; +#endif + const StringName *Wrapped::_get_extension_class_name() { return nullptr; }