Skip to content

Commit 7941e5c

Browse files
committed
Fix const qualifier warning on BaseGDObject::cast_from_variant
1 parent f748e85 commit 7941e5c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/godot/classes.pxd.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ cdef class BaseGDObject:
1313
ret._gd_ptr = obj
1414
return ret #}
1515

16+
# TODO: In theory we should pass a `const gd_variant_t *gdvar` since the variant
17+
# is not modified, however `GDExtensionTypeFromVariantConstructorFunc` doesn't
18+
# specified a const to the variant parameter...
1619
@staticmethod
17-
cdef inline object cast_from_variant(const gd_variant_t *gdvar):
20+
cdef inline object cast_from_variant(gd_variant_t *gdvar):
1821
cdef gd_object_t obj = gdapi.gd_object_from_variant(gdvar)
1922
if obj == NULL:
2023
return None

0 commit comments

Comments
 (0)