GDCLASS synced by ending with "private:"

• Matches implementation used by modules and godot itself
• Apply same to GDEXTENSION_CLASS, setup with same diff-friendly spacers as GDCLASS
pull/1292/head
Thaddeus Crews 2023-11-01 12:44:14 -05:00
parent c1196a1ab0
commit 6eb5d450bd
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
1 changed files with 101 additions and 97 deletions

View File

@ -365,10 +365,12 @@ public:
_gde_binding_create_callback, \ _gde_binding_create_callback, \
_gde_binding_free_callback, \ _gde_binding_free_callback, \
_gde_binding_reference_callback, \ _gde_binding_reference_callback, \
}; }; \
\
private:
// Don't use this for your classes, use GDCLASS() instead. // Don't use this for your classes, use GDCLASS() instead.
#define GDEXTENSION_CLASS_ALIAS(m_class, m_alias_for, m_inherits) \ #define GDEXTENSION_CLASS_ALIAS(m_class, m_alias_for, m_inherits) /******************************************************************************************************************/ \
private: \ private: \
inline static ::godot::internal::EngineClassRegistration<m_class> _gde_engine_class_registration_helper; \ inline static ::godot::internal::EngineClassRegistration<m_class> _gde_engine_class_registration_helper; \
void operator=(const m_class &p_rval) {} \ void operator=(const m_class &p_rval) {} \
@ -463,7 +465,9 @@ public:
_gde_binding_free_callback, \ _gde_binding_free_callback, \
_gde_binding_reference_callback, \ _gde_binding_reference_callback, \
}; \ }; \
m_class() : m_class(#m_alias_for) {} m_class() : m_class(#m_alias_for) {} \
\
private:
// Don't use this for your classes, use GDCLASS() instead. // Don't use this for your classes, use GDCLASS() instead.
#define GDEXTENSION_CLASS(m_class, m_inherits) GDEXTENSION_CLASS_ALIAS(m_class, m_class, m_inherits) #define GDEXTENSION_CLASS(m_class, m_inherits) GDEXTENSION_CLASS_ALIAS(m_class, m_class, m_inherits)