Убрал закомментированные фрагменты кода

This commit is contained in:
Никита Шипилов 2024-04-29 06:21:27 +04:00
parent 5414ff55a1
commit 915c8cea9c
2 changed files with 8 additions and 4 deletions

View File

@ -48,10 +48,14 @@ public abstract class AbstractCompany
SetObjectsPosition();
for (int i = 0; i < (_collection?.Count ?? 0); ++i)
{
try
{
DrawingPlane? obj = _collection?.Get(i);
obj?.DrawTransport(graphics);
}
catch (Exception) { }
}
return bitmap;
}

View File

@ -38,10 +38,10 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
_collection = Array.Empty<T?>();
}
public T Get(int position)
public T? Get(int position)
{
if (position >= _collection.Length || position < 0) throw new PositionOutOfCollectionException(position);
//if (_collection[position] == null) throw new ObjectNotFoundException(position);
if (_collection[position] == null) throw new ObjectNotFoundException(position);
return _collection[position];
}