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;
|
Error = LastError != 0;
|
||||||
|
|
||||||
if(transferLength > 1)
|
AaruConsole.DebugWriteLine("MMC Device",
|
||||||
AaruConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration);
|
transferLength > 1 ? "READ_MULTIPLE_BLOCK took {0} ms."
|
||||||
else
|
: "READ_SINGLE_BLOCK took {0} ms.", duration);
|
||||||
AaruConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);
|
|
||||||
|
|
||||||
return sense;
|
return sense;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,10 +70,7 @@ public partial class Device
|
|||||||
cdb[3] = (byte)(lba & 0xFF);
|
cdb[3] = (byte)(lba & 0xFF);
|
||||||
cdb[4] = transferLength;
|
cdb[4] = transferLength;
|
||||||
|
|
||||||
if(transferLength == 0)
|
buffer = transferLength == 0 ? new byte[256 * blockSize] : new byte[transferLength * blockSize];
|
||||||
buffer = new byte[256 * blockSize];
|
|
||||||
else
|
|
||||||
buffer = new byte[transferLength * blockSize];
|
|
||||||
|
|
||||||
LastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
|
LastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
|
||||||
out bool sense);
|
out bool sense);
|
||||||
|
|||||||
@@ -3897,10 +3897,9 @@ public sealed partial class AaruFormat
|
|||||||
|
|
||||||
subchannelBlock.cmpCrc64 = BitConverter.ToUInt64(blockCrc, 0);
|
subchannelBlock.cmpCrc64 = BitConverter.ToUInt64(blockCrc, 0);
|
||||||
|
|
||||||
if(_compressionAlgorithm == CompressionType.Lzma)
|
subchannelBlock.compression = _compressionAlgorithm == CompressionType.Lzma
|
||||||
subchannelBlock.compression = CompressionType.LzmaClauniaSubchannelTransform;
|
? CompressionType.LzmaClauniaSubchannelTransform
|
||||||
else
|
: _compressionAlgorithm;
|
||||||
subchannelBlock.compression = _compressionAlgorithm;
|
|
||||||
|
|
||||||
endCompress = DateTime.Now;
|
endCompress = DateTime.Now;
|
||||||
|
|
||||||
|
|||||||
@@ -109,12 +109,8 @@ public sealed partial class Dart
|
|||||||
if(stream.Length > expectedMaxSize)
|
if(stream.Length > expectedMaxSize)
|
||||||
return ErrorNumber.InvalidArgument;
|
return ErrorNumber.InvalidArgument;
|
||||||
|
|
||||||
short[] bLength;
|
var bLength =
|
||||||
|
new short[header.srcType is DISK_MAC_HD or DISK_DOS_HD ? BLOCK_ARRAY_LEN_HIGH : BLOCK_ARRAY_LEN_LOW];
|
||||||
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];
|
|
||||||
|
|
||||||
for(var i = 0; i < bLength.Length; i++)
|
for(var i = 0; i < bLength.Length; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,10 +72,7 @@ public sealed class AppleMap : IPartition
|
|||||||
{
|
{
|
||||||
uint sectorSize;
|
uint sectorSize;
|
||||||
|
|
||||||
if(imagePlugin.Info.SectorSize is 2352 or 2448)
|
sectorSize = imagePlugin.Info.SectorSize is 2352 or 2448 ? 2048 : imagePlugin.Info.SectorSize;
|
||||||
sectorSize = 2048;
|
|
||||||
else
|
|
||||||
sectorSize = imagePlugin.Info.SectorSize;
|
|
||||||
|
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
|
|||||||
@@ -78,10 +78,7 @@ public sealed class NeXTDisklabel : IPartition
|
|||||||
|
|
||||||
uint sectorSize;
|
uint sectorSize;
|
||||||
|
|
||||||
if(imagePlugin.Info.SectorSize is 2352 or 2448)
|
sectorSize = imagePlugin.Info.SectorSize is 2352 or 2448 ? 2048 : imagePlugin.Info.SectorSize;
|
||||||
sectorSize = 2048;
|
|
||||||
else
|
|
||||||
sectorSize = imagePlugin.Info.SectorSize;
|
|
||||||
|
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user