[Refactor] Convert to switch expressions.

This commit is contained in:
2024-05-01 17:18:37 +01:00
parent 87613c03b7
commit b75fcf0f41
48 changed files with 1321 additions and 2619 deletions

View File

@@ -398,18 +398,11 @@ sealed partial class Dump
break;
}
switch(desiredSubchannel)
{
case MmcSubchannel.None:
subType = TrackSubchannelType.None;
break;
case MmcSubchannel.Raw:
case MmcSubchannel.Q16:
subType = TrackSubchannelType.Raw;
break;
}
subType = desiredSubchannel switch
{
MmcSubchannel.None => TrackSubchannelType.None,
MmcSubchannel.Raw or MmcSubchannel.Q16 => TrackSubchannelType.Raw
};
blockSize = sectorSize + subSize;

View File

@@ -91,15 +91,11 @@ partial class Dump
if(opticalDisc)
{
switch(dskType)
{
case MediaType.REV35:
case MediaType.REV70:
case MediaType.REV120:
opticalDisc = false;
break;
}
opticalDisc = dskType switch
{
MediaType.REV35 or MediaType.REV70 or MediaType.REV120 => false,
_ => opticalDisc
};
}
_dumpLog.WriteLine(Localization.Core.Initializing_reader);