mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Convert into '?:' expression.
This commit is contained in:
Submodule Aaru.Decoders updated: f9e9b07584...e6db6032f3
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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<Partition>();
|
||||
|
||||
|
||||
@@ -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<Partition>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user