2
0
Эх сурвалжийг харах

Merge pull request #106133 from fLindahl/stringname_movable_dict_fix

[.NET] Avoid heap alloc when using StringNames as key in a Dictionary
Thaddeus Crews 4 сар өмнө
parent
commit
bd619b8d32

+ 1 - 1
modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs

@@ -161,7 +161,7 @@ namespace Godot
 
         public override int GetHashCode()
         {
-            return NativeValue.GetHashCode();
+            return NativeValue.DangerousSelfRef.GetHashCode();
         }
     }
 }