1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Fix GDNative Variant type size on 32-bit platforms, add size checking static asserts. [3.2]

This commit is contained in:
bruvzg
2020-05-17 16:11:49 +03:00
parent a2f32c970d
commit d255cc9e4d
19 changed files with 45 additions and 1 deletions

View File

@@ -37,6 +37,8 @@
extern "C" {
#endif
static_assert(sizeof(godot_transform2d) == sizeof(Transform2D), "Transform2D size mismatch");
void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) {
const Vector2 *pos = (const Vector2 *)p_pos;
Transform2D *dest = (Transform2D *)r_dest;