REFACTOR: Convert 'if' statement to 'switch' statement.

This commit is contained in:
2017-12-21 04:43:29 +00:00
parent df2fb651e4
commit 9cd1869d1d
55 changed files with 4429 additions and 4192 deletions

View File

@@ -61,8 +61,13 @@ namespace DiscImageChef.Checksums
if(channelStatus == null && subchannelStatus == null) status = null;
if(channelStatus == false || subchannelStatus == false) status = false;
if(channelStatus == null && subchannelStatus == true) status = true;
if(channelStatus == true && subchannelStatus == null) status = true;
switch(channelStatus) {
case null when subchannelStatus == true: status = true;
break;
case true when subchannelStatus == null: status = true;
break;
}
if(channelStatus == true && subchannelStatus == true) status = true;
return status;