diff options
Diffstat (limited to 'Spv.Generator/Instruction.cs')
-rw-r--r-- | Spv.Generator/Instruction.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Spv.Generator/Instruction.cs b/Spv.Generator/Instruction.cs index 92299404..27190f05 100644 --- a/Spv.Generator/Instruction.cs +++ b/Spv.Generator/Instruction.cs @@ -46,7 +46,7 @@ namespace Spv.Generator result += _resultType.WordCount; } - Span<Operand> operands = _operands.ToSpan(); + Span<Operand> operands = _operands.AsSpan(); for (int i = 0; i < operands.Length; i++) { result += operands[i].WordCount; @@ -120,7 +120,7 @@ namespace Spv.Generator writer.Write(Id); } - Span<Operand> operands = _operands.ToSpan(); + Span<Operand> operands = _operands.AsSpan(); for (int i = 0; i < operands.Length; i++) { operands[i].WriteOperand(writer); @@ -185,8 +185,8 @@ namespace Spv.Generator public bool EqualsContent(Instruction cmpObj) { - Span<Operand> thisOperands = _operands.ToSpan(); - Span<Operand> cmpOperands = cmpObj._operands.ToSpan(); + Span<Operand> thisOperands = _operands.AsSpan(); + Span<Operand> cmpOperands = cmpObj._operands.AsSpan(); if (thisOperands.Length != cmpOperands.Length) { @@ -211,7 +211,7 @@ namespace Spv.Generator public int GetHashCodeContent() { - return DeterministicHashCode.Combine<Operand>(_operands.ToSpan()); + return DeterministicHashCode.Combine<Operand>(_operands.AsSpan()); } public int GetHashCodeResultType() @@ -221,7 +221,7 @@ namespace Spv.Generator public override int GetHashCode() { - return DeterministicHashCode.Combine(Opcode, Id, _resultType, DeterministicHashCode.Combine<Operand>(_operands.ToSpan())); + return DeterministicHashCode.Combine(Opcode, Id, _resultType, DeterministicHashCode.Combine<Operand>(_operands.AsSpan())); } public bool Equals(Operand obj) |