Reduce uncertainty in returned value nullability

This commit is contained in:
Matt Nadareski
2025-01-13 13:22:48 -05:00
parent 8ec4605725
commit c6dde56c1e
5 changed files with 86 additions and 121 deletions

View File

@@ -416,8 +416,11 @@ namespace SabreTools.DatFiles
/// <summary>
/// Get the items associated with a bucket name
/// </summary>
public List<DatItem> GetItemsForBucket(string bucketName, bool filter = false)
public List<DatItem> GetItemsForBucket(string? bucketName, bool filter = false)
{
if (bucketName == null)
return [];
if (!_items.ContainsKey(bucketName))
return [];