Typed array equality operator logic updated
• Instead of calling to `_ref`, the same effect is achieved by calling to the base class assignment operator • No longer need to be expose `_ref`; set back to private & remove reference from gdextension_interface
This commit is contained in:
@ -1277,11 +1277,13 @@ static GDExtensionVariantPtr gdextension_array_operator_index_const(GDExtensionC
|
||||
return (GDExtensionVariantPtr)&self->operator[](p_index);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
void gdextension_array_ref(GDExtensionTypePtr p_self, GDExtensionConstTypePtr p_from) {
|
||||
Array *self = (Array *)p_self;
|
||||
const Array *from = (const Array *)p_from;
|
||||
self->_ref(*from);
|
||||
self->Array::operator=(*from);
|
||||
}
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
void gdextension_array_set_typed(GDExtensionTypePtr p_self, GDExtensionVariantType p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) {
|
||||
Array *self = reinterpret_cast<Array *>(p_self);
|
||||
@ -1798,7 +1800,9 @@ void gdextension_setup_interface() {
|
||||
REGISTER_INTERFACE_FUNC(packed_vector4_array_operator_index_const);
|
||||
REGISTER_INTERFACE_FUNC(array_operator_index);
|
||||
REGISTER_INTERFACE_FUNC(array_operator_index_const);
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
REGISTER_INTERFACE_FUNC(array_ref);
|
||||
#endif // DISABLE_DEPRECATED
|
||||
REGISTER_INTERFACE_FUNC(array_set_typed);
|
||||
REGISTER_INTERFACE_FUNC(dictionary_operator_index);
|
||||
REGISTER_INTERFACE_FUNC(dictionary_operator_index_const);
|
||||
|
||||
Reference in New Issue
Block a user