mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Enable nullability everywhere
This commit is contained in:
@@ -15,10 +15,10 @@ namespace SabreTools.DatFiles.Formats
|
||||
/// <inheritdoc/>
|
||||
protected override ItemType[] GetSupportedTypes()
|
||||
{
|
||||
return new ItemType[]
|
||||
{
|
||||
return
|
||||
[
|
||||
ItemType.Rom
|
||||
};
|
||||
];
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -261,7 +261,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
|
||||
var canOpen = new Models.OfflineList.CanOpen
|
||||
{
|
||||
Extension = Header.CanOpen.ToArray(),
|
||||
Extension = [.. Header.CanOpen],
|
||||
};
|
||||
|
||||
return canOpen;
|
||||
@@ -321,7 +321,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
|
||||
// Get the first item for game information
|
||||
var machine = items[0].Machine;
|
||||
var game = CreateGame(machine!);
|
||||
var game = OfflineList.CreateGame(machine!);
|
||||
|
||||
// Create holders for all item types
|
||||
var romCRCs = new List<Models.OfflineList.FileRomCRC>();
|
||||
@@ -348,19 +348,19 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
|
||||
// Assign the values to the game
|
||||
game.Files = new Models.OfflineList.Files { RomCRC = romCRCs.ToArray() };
|
||||
game.Files = new Models.OfflineList.Files { RomCRC = [.. romCRCs] };
|
||||
|
||||
// Add the game to the list
|
||||
games.Add(game);
|
||||
}
|
||||
|
||||
return new Models.OfflineList.Games { Game = games.ToArray() };
|
||||
return new Models.OfflineList.Games { Game = [.. games] };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a Machine from the current internal information
|
||||
/// <summary>
|
||||
private Models.OfflineList.Game CreateGame(Machine machine)
|
||||
private static Models.OfflineList.Game CreateGame(Machine machine)
|
||||
{
|
||||
|
||||
var game = new Models.OfflineList.Game
|
||||
|
||||
Reference in New Issue
Block a user