From cf07e0696e9a8f28ca77b8e77eaf9944b3314ef2 Mon Sep 17 00:00:00 2001 From: strwbrry1 Date: Sat, 20 Apr 2024 08:45:20 +0400 Subject: [PATCH] removing unnecessary checks --- .../CollectionGenericObjects/StorageCollection.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Catamaran/Catamaran/CollectionGenericObjects/StorageCollection.cs b/Catamaran/Catamaran/CollectionGenericObjects/StorageCollection.cs index 5227f8a..ad308ef 100644 --- a/Catamaran/Catamaran/CollectionGenericObjects/StorageCollection.cs +++ b/Catamaran/Catamaran/CollectionGenericObjects/StorageCollection.cs @@ -144,7 +144,7 @@ namespace Catamaran.CollectionGenericObjects return false; } - //_storages.Clear(); + _storages.Clear(); foreach (string data in strs) { string[] record = data.Split(_separatorKeyValue, StringSplitOptions.RemoveEmptyEntries); @@ -173,15 +173,7 @@ namespace Catamaran.CollectionGenericObjects } } } - - if (!_storages.ContainsKey(record[0])) - { - _storages.Add(record[0], collection); - } - else - { - return false; - } + } return true; }