optimize TasLagLog.RemoveLagEntry

just because I can
This commit is contained in:
Morilli 2024-09-28 17:29:47 +02:00
parent 24012bfb21
commit 0669483bd2
1 changed files with 4 additions and 5 deletions

View File

@ -106,13 +106,12 @@ namespace BizHawk.Client.Common
private void RemoveLagEntry(int frame)
{
var result = _lagLog.TryGetValue(frame, out var lag);
if (result)
int index = _lagLog.IndexOfKey(frame);
if (index >= 0)
{
_wasLag[frame] = lag;
_wasLag[frame] = _lagLog.Values[index];
_lagLog.RemoveAt(index);
}
_lagLog.Remove(frame);
}
}
}