From 6e8888240ba6f06cc673de32bb556c0dc90d283a Mon Sep 17 00:00:00 2001 From: AnnaLioness Date: Tue, 19 Dec 2023 12:28:11 +0400 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D1=91=D0=BD=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BC.=20=D0=BA=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Lab1ContainersShip/SetGeneric.cs | 23 ------------------- .../ShipGenericCollection.cs | 1 - 2 files changed, 24 deletions(-) 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()); }