diff --git a/Aaru.Decoders b/Aaru.Decoders index f9e9b0758..e6db6032f 160000 --- a/Aaru.Decoders +++ b/Aaru.Decoders @@ -1 +1 @@ -Subproject commit f9e9b075849906a893de77403968a18002886657 +Subproject commit e6db6032f3b1c15fdc428e89bacf1165224bb5a1 diff --git a/Aaru.Devices/Device/MmcCommands/MMC.cs b/Aaru.Devices/Device/MmcCommands/MMC.cs index e07705613..63ef4379e 100644 --- a/Aaru.Devices/Device/MmcCommands/MMC.cs +++ b/Aaru.Devices/Device/MmcCommands/MMC.cs @@ -237,10 +237,9 @@ public partial class Device Error = LastError != 0; - if(transferLength > 1) - AaruConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration); - else - AaruConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration); + AaruConsole.DebugWriteLine("MMC Device", + transferLength > 1 ? "READ_MULTIPLE_BLOCK took {0} ms." + : "READ_SINGLE_BLOCK took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/SBC.cs b/Aaru.Devices/Device/ScsiCommands/SBC.cs index 9a093eccb..38731ce81 100644 --- a/Aaru.Devices/Device/ScsiCommands/SBC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SBC.cs @@ -70,10 +70,7 @@ public partial class Device cdb[3] = (byte)(lba & 0xFF); cdb[4] = transferLength; - if(transferLength == 0) - buffer = new byte[256 * blockSize]; - else - buffer = new byte[transferLength * blockSize]; + buffer = transferLength == 0 ? new byte[256 * blockSize] : new byte[transferLength * blockSize]; LastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration, out bool sense); diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs index 3886ad42a..ab93b55da 100644 --- a/Aaru.Images/AaruFormat/Write.cs +++ b/Aaru.Images/AaruFormat/Write.cs @@ -3897,10 +3897,9 @@ public sealed partial class AaruFormat subchannelBlock.cmpCrc64 = BitConverter.ToUInt64(blockCrc, 0); - if(_compressionAlgorithm == CompressionType.Lzma) - subchannelBlock.compression = CompressionType.LzmaClauniaSubchannelTransform; - else - subchannelBlock.compression = _compressionAlgorithm; + subchannelBlock.compression = _compressionAlgorithm == CompressionType.Lzma + ? CompressionType.LzmaClauniaSubchannelTransform + : _compressionAlgorithm; endCompress = DateTime.Now; diff --git a/Aaru.Images/DART/Read.cs b/Aaru.Images/DART/Read.cs index 637a45435..ea5c33c07 100644 --- a/Aaru.Images/DART/Read.cs +++ b/Aaru.Images/DART/Read.cs @@ -109,12 +109,8 @@ public sealed partial class Dart if(stream.Length > expectedMaxSize) return ErrorNumber.InvalidArgument; - short[] bLength; - - if(header.srcType is DISK_MAC_HD or DISK_DOS_HD) - bLength = new short[BLOCK_ARRAY_LEN_HIGH]; - else - bLength = new short[BLOCK_ARRAY_LEN_LOW]; + var bLength = + new short[header.srcType is DISK_MAC_HD or DISK_DOS_HD ? BLOCK_ARRAY_LEN_HIGH : BLOCK_ARRAY_LEN_LOW]; for(var i = 0; i < bLength.Length; i++) { diff --git a/Aaru.Partitions/AppleMap.cs b/Aaru.Partitions/AppleMap.cs index bb3594359..fadfa935f 100644 --- a/Aaru.Partitions/AppleMap.cs +++ b/Aaru.Partitions/AppleMap.cs @@ -72,10 +72,7 @@ public sealed class AppleMap : IPartition { uint sectorSize; - if(imagePlugin.Info.SectorSize is 2352 or 2448) - sectorSize = 2048; - else - sectorSize = imagePlugin.Info.SectorSize; + sectorSize = imagePlugin.Info.SectorSize is 2352 or 2448 ? 2048 : imagePlugin.Info.SectorSize; partitions = new List(); diff --git a/Aaru.Partitions/NeXT.cs b/Aaru.Partitions/NeXT.cs index 44db56232..403fd4c16 100644 --- a/Aaru.Partitions/NeXT.cs +++ b/Aaru.Partitions/NeXT.cs @@ -78,10 +78,7 @@ public sealed class NeXTDisklabel : IPartition uint sectorSize; - if(imagePlugin.Info.SectorSize is 2352 or 2448) - sectorSize = 2048; - else - sectorSize = imagePlugin.Info.SectorSize; + sectorSize = imagePlugin.Info.SectorSize is 2352 or 2448 ? 2048 : imagePlugin.Info.SectorSize; partitions = new List();