Make StateInformation a readonly struct

This helps a lot when many states exist, struct allocs are much cheaper than classes
This commit is contained in:
Morilli 2024-09-29 04:05:32 +02:00
parent 0ac81016b1
commit ae5d4ab160
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ namespace BizHawk.Client.Common
return stream;
}
public class StateInformation
public readonly struct StateInformation
{
private readonly int _index;
public int Frame => _parent._states[_index].Frame;