mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Convert 'if' statement to 'switch' statement.
This commit is contained in:
@@ -2038,17 +2038,17 @@ namespace DiscImageChef.DiscImages
|
||||
uint sector_size;
|
||||
|
||||
if(tag == SectorTagType.CdSectorSubchannel)
|
||||
if(track.TrackSubchannelType == TrackSubchannelType.None)
|
||||
throw new FeatureNotPresentImageException("Requested sector does not contain subchannel");
|
||||
else if(track.TrackSubchannelType == TrackSubchannelType.RawInterleaved)
|
||||
{
|
||||
sector_offset = (uint)track.TrackRawBytesPerSector;
|
||||
sector_size = 96;
|
||||
switch(track.TrackSubchannelType) {
|
||||
case TrackSubchannelType.None: throw new FeatureNotPresentImageException("Requested sector does not contain subchannel");
|
||||
case TrackSubchannelType.RawInterleaved:
|
||||
sector_offset = (uint)track.TrackRawBytesPerSector;
|
||||
sector_size = 96;
|
||||
break;
|
||||
default:
|
||||
throw new
|
||||
FeatureSupportedButNotImplementedImageException(string.Format("Unsupported subchannel type {0}",
|
||||
track.TrackSubchannelType));
|
||||
}
|
||||
else
|
||||
throw new
|
||||
FeatureSupportedButNotImplementedImageException(string.Format("Unsupported subchannel type {0}",
|
||||
track.TrackSubchannelType));
|
||||
else
|
||||
switch(track.TrackType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user