mirror of
https://github.com/aaru-dps/Aaru.Checksums.git
synced 2025-12-16 19:24:29 +00:00
REFACTOR: Convert 'if' statement to 'switch' statement.
This commit is contained in:
@@ -61,8 +61,13 @@ namespace DiscImageChef.Checksums
|
|||||||
|
|
||||||
if(channelStatus == null && subchannelStatus == null) status = null;
|
if(channelStatus == null && subchannelStatus == null) status = null;
|
||||||
if(channelStatus == false || subchannelStatus == false) status = false;
|
if(channelStatus == false || subchannelStatus == false) status = false;
|
||||||
if(channelStatus == null && subchannelStatus == true) status = true;
|
switch(channelStatus) {
|
||||||
if(channelStatus == true && subchannelStatus == null) status = true;
|
case null when subchannelStatus == true: status = true;
|
||||||
|
break;
|
||||||
|
case true when subchannelStatus == null: status = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(channelStatus == true && subchannelStatus == true) status = true;
|
if(channelStatus == true && subchannelStatus == true) status = true;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user