|
@@ -120,7 +120,7 @@ struct EngineClassRegistration {
|
|
|
|
|
|
#define GDCLASS(m_class, m_inherits) \
|
|
#define GDCLASS(m_class, m_inherits) \
|
|
private: \
|
|
private: \
|
|
- void operator=(const m_class &p_rval) {} \
|
|
|
|
|
|
+ void operator=(const m_class & /*p_rval*/) {} \
|
|
friend class ::godot::ClassDB; \
|
|
friend class ::godot::ClassDB; \
|
|
\
|
|
\
|
|
protected: \
|
|
protected: \
|
|
@@ -212,23 +212,27 @@ public:
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
static GDExtensionBool set_bind(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionConstVariantPtr p_value) { \
|
|
static GDExtensionBool set_bind(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionConstVariantPtr p_value) { \
|
|
- if (p_instance && m_class::_get_set()) { \
|
|
|
|
|
|
+ if (p_instance) { \
|
|
|
|
+ if (m_inherits::set_bind(p_instance, p_name, p_value)) { \
|
|
|
|
+ return true; \
|
|
|
|
+ } \
|
|
if (m_class::_get_set() != m_inherits::_get_set()) { \
|
|
if (m_class::_get_set() != m_inherits::_get_set()) { \
|
|
m_class *cls = reinterpret_cast<m_class *>(p_instance); \
|
|
m_class *cls = reinterpret_cast<m_class *>(p_instance); \
|
|
return cls->_set(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<const ::godot::Variant *>(p_value)); \
|
|
return cls->_set(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<const ::godot::Variant *>(p_value)); \
|
|
} \
|
|
} \
|
|
- return m_inherits::set_bind(p_instance, p_name, p_value); \
|
|
|
|
} \
|
|
} \
|
|
return false; \
|
|
return false; \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
static GDExtensionBool get_bind(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionVariantPtr r_ret) { \
|
|
static GDExtensionBool get_bind(GDExtensionClassInstancePtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionVariantPtr r_ret) { \
|
|
- if (p_instance && m_class::_get_get()) { \
|
|
|
|
|
|
+ if (p_instance) { \
|
|
|
|
+ if (m_inherits::get_bind(p_instance, p_name, r_ret)) { \
|
|
|
|
+ return true; \
|
|
|
|
+ } \
|
|
if (m_class::_get_get() != m_inherits::_get_get()) { \
|
|
if (m_class::_get_get() != m_inherits::_get_get()) { \
|
|
m_class *cls = reinterpret_cast<m_class *>(p_instance); \
|
|
m_class *cls = reinterpret_cast<m_class *>(p_instance); \
|
|
return cls->_get(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<::godot::Variant *>(r_ret)); \
|
|
return cls->_get(*reinterpret_cast<const ::godot::StringName *>(p_name), *reinterpret_cast<::godot::Variant *>(r_ret)); \
|
|
} \
|
|
} \
|
|
- return m_inherits::get_bind(p_instance, p_name, r_ret); \
|
|
|
|
} \
|
|
} \
|
|
return false; \
|
|
return false; \
|
|
} \
|
|
} \
|
|
@@ -304,7 +308,7 @@ public:
|
|
} \
|
|
} \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
- static void free(void *data, GDExtensionClassInstancePtr ptr) { \
|
|
|
|
|
|
+ static void free(void * /*data*/, GDExtensionClassInstancePtr ptr) { \
|
|
if (ptr) { \
|
|
if (ptr) { \
|
|
m_class *cls = reinterpret_cast<m_class *>(ptr); \
|
|
m_class *cls = reinterpret_cast<m_class *>(ptr); \
|
|
cls->~m_class(); \
|
|
cls->~m_class(); \
|
|
@@ -312,14 +316,14 @@ public:
|
|
} \
|
|
} \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
- static void *_gde_binding_create_callback(void *p_token, void *p_instance) { \
|
|
|
|
|
|
+ static void *_gde_binding_create_callback(void * /*p_token*/, void * /*p_instance*/) { \
|
|
return nullptr; \
|
|
return nullptr; \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
- static void _gde_binding_free_callback(void *p_token, void *p_instance, void *p_binding) { \
|
|
|
|
|
|
+ static void _gde_binding_free_callback(void * /*p_token*/, void * /*p_instance*/, void * /*p_binding*/) { \
|
|
} \
|
|
} \
|
|
\
|
|
\
|
|
- static GDExtensionBool _gde_binding_reference_callback(void *p_token, void *p_instance, GDExtensionBool p_reference) { \
|
|
|
|
|
|
+ static GDExtensionBool _gde_binding_reference_callback(void * /*p_token*/, void * /*p_instance*/, GDExtensionBool /*p_reference*/) { \
|
|
return true; \
|
|
return true; \
|
|
} \
|
|
} \
|
|
\
|
|
\
|