diff --git a/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs b/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs index 739d8c2..0f1305e 100644 --- a/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs +++ b/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs @@ -34,21 +34,6 @@ namespace Lab1ContainersShip /// /// Добавляемый автомобиль /// - /*public int Insert(T ship) - { - // TODO вставка в начало набора - if(_places.Count >= _maxCount) - { - throw new StorageOverflowException(); - return -1; - - } - else - { - _places.Insert(0, ship); - return 0; - } - }*/ public bool Insert(T ship, IEqualityComparer? equal = null) { return Insert(ship, 0, equal); @@ -79,14 +64,6 @@ namespace Lab1ContainersShip { throw new ShipNotFoundException(position); } - /*if(position == _places.Count) - { - _places.Add(ship); - } - else - { - _places.Insert(position, ship); - }*/ if (equal != null && _places.Contains(ship, equal)) { throw new ApplicationException("уже есть"); diff --git a/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs b/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs index 04fc375..8fa414e 100644 --- a/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs +++ b/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs @@ -60,7 +60,6 @@ namespace Lab1ContainersShip { return false; } - //return collect?._collection.Insert(obj) ?? -1; return (bool)collect?._collection.Insert(obj, new DrawiningShipEqutables()); }