Fix GDNative wrapper type sizes (RID, Variant, Packed*Array), add size checking static asserts.
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static_assert(sizeof(godot_vector2) == sizeof(Vector2), "Vector2 size mismatch");
|
||||
|
||||
void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) {
|
||||
Vector2 *dest = (Vector2 *)r_dest;
|
||||
*dest = Vector2(p_x, p_y);
|
||||
|
||||
Reference in New Issue
Block a user