mirror of
https://github.com/aaru-dps/Aaru.Checksums.git
synced 2025-12-16 19:24:29 +00:00
Convert to switch expression.
This commit is contained in:
@@ -96,17 +96,12 @@ public static class CdChecksums
|
||||
subchannelStatus == false)
|
||||
status = false;
|
||||
|
||||
switch(channelStatus)
|
||||
{
|
||||
case null when subchannelStatus == true:
|
||||
status = true;
|
||||
|
||||
break;
|
||||
case true when subchannelStatus == null:
|
||||
status = true;
|
||||
|
||||
break;
|
||||
}
|
||||
status = channelStatus switch
|
||||
{
|
||||
null when subchannelStatus == true => true,
|
||||
true when subchannelStatus == null => true,
|
||||
_ => status
|
||||
};
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user