Skip to content

Commit f9ccf28

Browse files
authored
Merge pull request #1034 from Bromeon/qol/array-set-typed
`array_set_typed()` now called with `GDExtensionVariantType` instead of `uint32_t`
2 parents 516fad1 + 706006e commit f9ccf28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/variant/packed_arrays.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ Variant &Array::operator[](int p_index) {
209209
}
210210

211211
void Array::set_typed(uint32_t p_type, const StringName &p_class_name, const Variant &p_script) {
212-
internal::gde_interface->array_set_typed((GDExtensionTypePtr *)this, p_type, (GDExtensionConstStringNamePtr)&p_class_name, (GDExtensionConstVariantPtr)&p_script);
212+
// p_type is not Variant::Type so that header doesn't depend on <variant.hpp>.
213+
internal::gde_interface->array_set_typed((GDExtensionTypePtr *)this, (GDExtensionVariantType)p_type, (GDExtensionConstStringNamePtr)&p_class_name, (GDExtensionConstVariantPtr)&p_script);
213214
}
214215

215216
void Array::_ref(const Array &p_from) const {

0 commit comments

Comments
 (0)