Skip to content

Commit c4f82ad

Browse files
committed
Use direct lengths of array instead of Count property
1 parent 0201d46 commit c4f82ad

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Orm/Xtensive.Orm/Tuples/TupleDescriptor.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ public TupleDescriptor Segment(in Segment<int> segment)
120120
/// <returns>New tuple descriptor containing fields of the both given source descriptors.</returns>
121121
public TupleDescriptor ConcatWith(in TupleDescriptor second)
122122
{
123-
var (firstCount, secondCount) = (Count, second.Count);
124-
var fieldTypes = new Type[firstCount + secondCount];
125-
Array.Copy(this.fieldTypes, fieldTypes, firstCount);
126-
Array.Copy(second.fieldTypes, 0, fieldTypes, firstCount, secondCount);
123+
var firstLength = this.fieldTypes.Length;
124+
var secondLength = second.fieldTypes.Length;
125+
var fieldTypes = new Type[firstLength + secondLength];
126+
Array.Copy(this.fieldTypes, fieldTypes, firstLength);
127+
Array.Copy(second.fieldTypes, 0, fieldTypes, firstLength, secondLength);
127128

128129
return new TupleDescriptor(fieldTypes);
129130
}

0 commit comments

Comments
 (0)