From e6db6032f3b1c15fdc428e89bacf1165224bb5a1 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 14 Nov 2022 01:27:11 +0000 Subject: [PATCH] Convert into '?:' expression. --- SCSI/MMC/Features.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/SCSI/MMC/Features.cs b/SCSI/MMC/Features.cs index 7295691c9..01ab1130c 100644 --- a/SCSI/MMC/Features.cs +++ b/SCSI/MMC/Features.cs @@ -3754,10 +3754,7 @@ public static class Features break; default: { - if(ftr.DVDPRead) - sb.Append("Drive can read CD-MRW and DVD+MRW"); - else - sb.Append("Drive can read CD-MRW"); + sb.Append(ftr.DVDPRead ? "Drive can read CD-MRW and DVD+MRW" : "Drive can read CD-MRW"); break; } @@ -4312,10 +4309,8 @@ public static class Features break; default: { - if(ftr.HDDVDRAM) - sb.Append("Drive can read HD DVD-ROM, HD DVD-RW and HD DVD-RAM"); - else - sb.Append("Drive can read HD DVD-ROM and HD DVD-RW"); + sb.Append(ftr.HDDVDRAM ? "Drive can read HD DVD-ROM, HD DVD-RW and HD DVD-RAM" + : "Drive can read HD DVD-ROM and HD DVD-RW"); break; } @@ -4349,10 +4344,7 @@ public static class Features break; default: { - if(ftr.HDDVDRAM) - sb.Append("Drive can write HD DVD-RW and HD DVD-RAM"); - else - sb.Append("Drive can write HD DVD-RW"); + sb.Append(ftr.HDDVDRAM ? "Drive can write HD DVD-RW and HD DVD-RAM" : "Drive can write HD DVD-RW"); break; }