1
- // Copyright (C) 2008-2020 Xtensive LLC.
1
+ // Copyright (C) 2008-2022 Xtensive LLC.
2
2
// This code is distributed under MIT license terms.
3
3
// See the License.txt file in the project root for more information.
4
4
// Created by: Alex Yakunin
@@ -474,7 +474,7 @@ private static void PartiallyCopyTupleFast(PackedTuple source, PackedTuple targe
474
474
475
475
private static void CopyTupleWithMappingSlow ( Tuple source , Tuple target , IReadOnlyList < int > map )
476
476
{
477
- for ( int targetIndex = 0 ; targetIndex < map . Count ; targetIndex ++ ) {
477
+ for ( int targetIndex = 0 , count = map . Count ; targetIndex < count ; targetIndex ++ ) {
478
478
var sourceIndex = map [ targetIndex ] ;
479
479
if ( sourceIndex >= 0 )
480
480
CopyValue ( source , sourceIndex , target , targetIndex ) ;
@@ -492,7 +492,7 @@ private static void CopyTupleWithMappingFast(PackedTuple source, PackedTuple tar
492
492
493
493
private static void CopyTupleArrayWithMappingSlow ( Tuple [ ] sources , Tuple target , Pair < int , int > [ ] map )
494
494
{
495
- for ( int targetIndex = 0 ; targetIndex < map . Length ; targetIndex ++ ) {
495
+ for ( int targetIndex = 0 , length = map . Length ; targetIndex < length ; targetIndex ++ ) {
496
496
var sourceInfo = map [ targetIndex ] ;
497
497
var sourceTupleIndex = sourceInfo . First ;
498
498
var sourceFieldIndex = sourceInfo . Second ;
@@ -514,7 +514,7 @@ private static void CopyTupleArrayWithMappingFast(PackedTuple[] sources, PackedT
514
514
515
515
private static void Copy3TuplesWithMappingSlow ( FixedList3 < Tuple > sources , Tuple target , Pair < int , int > [ ] map )
516
516
{
517
- for ( int targetIndex = 0 ; targetIndex < map . Length ; targetIndex ++ ) {
517
+ for ( int targetIndex = 0 , length = map . Length ; targetIndex < length ; targetIndex ++ ) {
518
518
var sourceInfo = map [ targetIndex ] ;
519
519
var sourceTupleIndex = sourceInfo . First ;
520
520
var sourceFieldIndex = sourceInfo . Second ;
0 commit comments