From 2ebfeef4a817d8da1007dd5bb1a125a26f2def9f Mon Sep 17 00:00:00 2001 From: EyalZusiman Date: Thu, 8 May 2025 18:27:19 +0300 Subject: [PATCH] C#: use stackalloc to create the pivot arrays in Projection.Inverse --- modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs index 3f4eca551e6..108702037a3 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs @@ -674,8 +674,8 @@ namespace Godot { Projection proj = this; int i, j, k; - int[] pvt_i = new int[4]; - int[] pvt_j = new int[4]; /* Locations of pivot matrix */ + Span pvt_i = stackalloc int[4]; + Span pvt_j = stackalloc int[4]; /* Locations of pivot matrix */ real_t pvt_val; /* Value of current pivot element */ real_t hold; /* Temporary storage */ real_t determinant = 1.0f;