Почищен код 1

This commit is contained in:
Данила Мочалов 2022-11-21 17:06:04 +04:00
parent 3f65961713
commit 88b702d5b5

View File

@ -50,7 +50,7 @@ namespace Locomotive
throw new LocomotiveNotFoundException(position);
}
T result = _places[position];
_places[position] = null; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! РАНЬШЕ REMOVE
_places[position] = null;
return result;
}
// Индексатор
@ -72,8 +72,6 @@ namespace Locomotive
{
foreach (var locomotive in _places)
{
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! РАНЬШЕ ВОЗВРАЩАЛОСЬ ТОЛЬКО ЕСЛИ НЕ НУЛЛ
yield return locomotive;
}