Merged master

This commit is contained in:
MrGadget1024 2023-02-14 03:51:38 -05:00
commit 31349c708c
2 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,7 @@ jobs:
- 2019.4.40f1 - 2019.4.40f1
- 2020.3.44f1 - 2020.3.44f1
- 2021.3.18f1 - 2021.3.18f1
- 2022.2.5f1 - 2022.2.6f1
steps: steps:
- name: Checkout repository - name: Checkout repository

View File

@ -9,7 +9,11 @@ public static class Extensions
public static string ToHexString(this ArraySegment<byte> segment) => public static string ToHexString(this ArraySegment<byte> segment) =>
BitConverter.ToString(segment.Array, segment.Offset, segment.Count); BitConverter.ToString(segment.Array, segment.Offset, segment.Count);
public static readonly Dictionary<string, int> StableHashes = new Dictionary<string, int>(); // GetStableHashCode is O(N).
// the longer the string, the more it needs to compute:
// https://github.com/MirrorNetworking/Mirror/pull/3377
// cache results for O(1) lookups.
static readonly Dictionary<string, int> StableHashes = new Dictionary<string, int>();
[UnityEngine.RuntimeInitializeOnLoadMethod] [UnityEngine.RuntimeInitializeOnLoadMethod]
public static void ResetStatics() public static void ResetStatics()