mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Common DatItem properties can never be null
This commit is contained in:
@@ -5,7 +5,6 @@ namespace SabreTools.DatFiles.Test
|
||||
#region RemoveHeaderFields
|
||||
|
||||
// TODO: Write RemoveHeaderFields tests
|
||||
// - Null header
|
||||
// - Empty list
|
||||
// - Full list
|
||||
|
||||
@@ -14,7 +13,6 @@ namespace SabreTools.DatFiles.Test
|
||||
#region RemoveItemFields
|
||||
|
||||
// TODO: Write RemoveItemFields tests
|
||||
// - Null item dict
|
||||
// - Both lists empty
|
||||
// - Machine only
|
||||
// - Item only
|
||||
@@ -25,7 +23,6 @@ namespace SabreTools.DatFiles.Test
|
||||
#region RemoveItemFieldsDB
|
||||
|
||||
// TODO: Write RemoveItemFieldsDB tests
|
||||
// - Null item dict
|
||||
// - Both lists empty
|
||||
// - Machine only
|
||||
// - Item only
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace SabreTools.DatFiles
|
||||
public void RemoveHeaderFields(List<string> headerFieldNames)
|
||||
{
|
||||
// If we have an invalid input, return
|
||||
if (Header == null || headerFieldNames.Count == 0)
|
||||
if (headerFieldNames.Count == 0)
|
||||
return;
|
||||
|
||||
foreach (var fieldName in headerFieldNames)
|
||||
@@ -34,7 +34,7 @@ namespace SabreTools.DatFiles
|
||||
public void RemoveItemFields(List<string> machineFieldNames, Dictionary<string, List<string>> itemFieldNames)
|
||||
{
|
||||
// If we have an invalid input, return
|
||||
if (Items == null || (machineFieldNames.Count == 0 && itemFieldNames.Count == 0))
|
||||
if (machineFieldNames.Count == 0 && itemFieldNames.Count == 0)
|
||||
return;
|
||||
|
||||
#if NET452_OR_GREATER || NETCOREAPP
|
||||
@@ -70,7 +70,7 @@ namespace SabreTools.DatFiles
|
||||
public void RemoveItemFieldsDB(List<string> machineFieldNames, Dictionary<string, List<string>> itemFieldNames)
|
||||
{
|
||||
// If we have an invalid input, return
|
||||
if (ItemsDB == null || (machineFieldNames.Count == 0 && itemFieldNames.Count == 0))
|
||||
if (machineFieldNames.Count == 0 && itemFieldNames.Count == 0)
|
||||
return;
|
||||
|
||||
// Handle machine removals
|
||||
|
||||
Reference in New Issue
Block a user