Skip to content

Commit 3bf94bd

Browse files
committed
cosmetic
1 parent a5a83bc commit 3bf94bd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/AutoMapper/Mappers/CollectionMapper.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,24 +241,23 @@ bool MustMap(Type sourceType, Type destinationType) => !destinationType.IsAssign
241241
}
242242
public readonly struct MultidimensionalArrayFiller(Array destination)
243243
{
244-
private readonly int[] _indices = new int[destination.Rank];
245-
private readonly Array _destination = destination;
244+
readonly int[] _indices = new int[destination.Rank];
246245
public void NewValue(object value)
247246
{
248-
var dimension = _destination.Rank - 1;
247+
var dimension = destination.Rank - 1;
249248
var changedDimension = false;
250-
while (_indices[dimension] == _destination.GetLength(dimension))
249+
while (_indices[dimension] == destination.GetLength(dimension))
251250
{
252251
_indices[dimension] = 0;
253252
dimension--;
254253
if (dimension < 0)
255254
{
256-
throw new InvalidOperationException("Not enough room in destination array " + _destination);
255+
throw new InvalidOperationException("Not enough room in destination array " + destination);
257256
}
258257
_indices[dimension]++;
259258
changedDimension = true;
260259
}
261-
_destination.SetValue(value, _indices);
260+
destination.SetValue(value, _indices);
262261
if (changedDimension)
263262
{
264263
_indices[dimension + 1]++;

0 commit comments

Comments
 (0)