Make structs readonly when applicable (#4002)
* Make all structs readonly when applicable. It should reduce amount of needless defensive copies * Make structs with trivial boilerplate equality code record structs * Remove unnecessary readonly modifiers from TextureCreateInfo * Make BitMap structs readonly too
This commit is contained in:
@ -40,7 +40,7 @@ namespace Ryujinx.Horizon.Generators.Kernel
|
||||
$"{TypeKernelResultName}.InvalidState"
|
||||
};
|
||||
|
||||
private struct OutParameter
|
||||
private readonly struct OutParameter
|
||||
{
|
||||
public readonly string Identifier;
|
||||
public readonly bool NeedsSplit;
|
||||
@ -104,7 +104,7 @@ namespace Ryujinx.Horizon.Generators.Kernel
|
||||
}
|
||||
}
|
||||
|
||||
private struct SyscallIdAndName : IComparable<SyscallIdAndName>
|
||||
private readonly struct SyscallIdAndName : IComparable<SyscallIdAndName>
|
||||
{
|
||||
public readonly int Id;
|
||||
public readonly string Name;
|
||||
|
Reference in New Issue
Block a user