From a5ff0024fb33964c802e1712e5b11a52390603e7 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 11 Aug 2022 18:07:37 -0300 Subject: Rename ToSpan to AsSpan (#3556) --- Spv.Generator/Instruction.cs | 12 ++++++------ Spv.Generator/InstructionOperands.cs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Spv.Generator') 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 operands = _operands.ToSpan(); + Span 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 operands = _operands.ToSpan(); + Span 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 thisOperands = _operands.ToSpan(); - Span cmpOperands = cmpObj._operands.ToSpan(); + Span thisOperands = _operands.AsSpan(); + Span cmpOperands = cmpObj._operands.AsSpan(); if (thisOperands.Length != cmpOperands.Length) { @@ -211,7 +211,7 @@ namespace Spv.Generator public int GetHashCodeContent() { - return DeterministicHashCode.Combine(_operands.ToSpan()); + return DeterministicHashCode.Combine(_operands.AsSpan()); } public int GetHashCodeResultType() @@ -221,7 +221,7 @@ namespace Spv.Generator public override int GetHashCode() { - return DeterministicHashCode.Combine(Opcode, Id, _resultType, DeterministicHashCode.Combine(_operands.ToSpan())); + return DeterministicHashCode.Combine(Opcode, Id, _resultType, DeterministicHashCode.Combine(_operands.AsSpan())); } public bool Equals(Operand obj) diff --git a/Spv.Generator/InstructionOperands.cs b/Spv.Generator/InstructionOperands.cs index c7170ec1..a349827a 100644 --- a/Spv.Generator/InstructionOperands.cs +++ b/Spv.Generator/InstructionOperands.cs @@ -15,7 +15,7 @@ namespace Spv.Generator public Operand Operand5; public Operand[] Overflow; - public Span ToSpan() + public Span AsSpan() { if (Count > InternalCount) { -- cgit v1.2.3