From 6d6617ecab71d2143c202cea9e61126c741a7ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=A4=D0=B5=D0=B4=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Wed, 27 Dec 2023 22:55:21 +0400 Subject: [PATCH] 0.8.2 --- .../MilitaryGenrericCollection.cs | 2 +- .../SelfPropelledArtilleryUnit.Basic/SetGeneric.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/MilitaryGenrericCollection.cs b/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/MilitaryGenrericCollection.cs index ef9a370..f898e03 100644 --- a/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/MilitaryGenrericCollection.cs +++ b/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/MilitaryGenrericCollection.cs @@ -39,7 +39,7 @@ namespace SelfPropelledArtilleryUnit.Basic if (obj == null || collect == null) return false; - return collect?.collection.Insert(obj) ?? false; + return (bool)collect?.collection.Insert(obj, new DrawiningMillitaryUnitEqutables()); } public static T? operator -(MilitaryGenrericCollection collect, int pos) diff --git a/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/SetGeneric.cs b/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/SetGeneric.cs index 0a76b6d..c23051e 100644 --- a/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/SetGeneric.cs +++ b/SelfPropelledArtilleryUnit.Basic/SelfPropelledArtilleryUnit.Basic/SetGeneric.cs @@ -28,7 +28,7 @@ namespace SelfPropelledArtilleryUnit.Basic public bool Insert(T MilitaryUnit, int index, IEqualityComparer? equal = null) { if (!(index >= 0 && index <= Count && places.Count < maxCount)) - return false; + throw new UnitNotFoundException(index); if (places.Count == maxCount) throw new StorageOverflowException(index); if (equal != null && places.Contains(MilitaryUnit, equal))