Enable nullability everywhere

This commit is contained in:
Matt Nadareski
2024-02-28 19:19:50 -05:00
parent 11d024bd16
commit 823a9ca7b7
145 changed files with 1545 additions and 1260 deletions

View File

@@ -16,18 +16,18 @@ namespace SabreTools.FileTypes.Aaru
/// <summary>Length in bytes of checksum that follows this structure</summary>
public uint length;
/// <summary>Checksum that follows this structure</summary>
public byte[] checksum;
public byte[]? checksum;
/// <summary>
/// Read a stream as an v
/// </summary>
/// <param name="stream">ChecksumEntry as a stream</param>
/// <returns>Populated ChecksumEntry, null on failure</returns>
public static ChecksumEntry Deserialize(Stream stream)
public static ChecksumEntry? Deserialize(Stream stream)
{
ChecksumEntry checksumEntry = new ChecksumEntry();
var checksumEntry = new ChecksumEntry();
using (BinaryReader br = new BinaryReader(stream, Encoding.Default, true))
using (var br = new BinaryReader(stream, Encoding.Default, true))
{
checksumEntry.type = (AaruChecksumAlgorithm)br.ReadByte();
checksumEntry.length = br.ReadUInt32();