Rename some collection stuff.

This commit is contained in:
Ottermandias 2022-08-13 21:18:21 +02:00
parent f264725c45
commit 8aefdbd948
9 changed files with 51 additions and 35 deletions

View file

@ -17,7 +17,7 @@ public unsafe struct CustomizeData : IEquatable< CustomizeData >
}
}
public void Write( void* target )
public readonly void Write( void* target )
{
fixed( byte* ptr = Data )
{
@ -25,14 +25,14 @@ public unsafe struct CustomizeData : IEquatable< CustomizeData >
}
}
public CustomizeData Clone()
public readonly CustomizeData Clone()
{
var ret = new CustomizeData();
Write( ret.Data );
return ret;
}
public bool Equals( CustomizeData other )
public readonly bool Equals( CustomizeData other )
{
fixed( byte* ptr = Data )
{
@ -40,6 +40,9 @@ public unsafe struct CustomizeData : IEquatable< CustomizeData >
}
}
public static bool Equals( CustomizeData* lhs, CustomizeData* rhs )
=> Functions.MemCmpUnchecked( lhs, rhs, Size ) == 0;
public override bool Equals( object? obj )
=> obj is CustomizeData other && Equals( other );