mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Inline 'out' variable declaration.
This commit is contained in:
@@ -71,8 +71,6 @@ partial class Dump
|
||||
return sense;
|
||||
}
|
||||
|
||||
byte[] subBuf;
|
||||
|
||||
uint subSize = supportedPlextorSubchannel == PlextorSubchannel.Q16 ? 16u : 96u;
|
||||
|
||||
if(supportedPlextorSubchannel is PlextorSubchannel.Q16 or PlextorSubchannel.Pack)
|
||||
@@ -94,7 +92,7 @@ partial class Dump
|
||||
if(sense)
|
||||
return true;
|
||||
|
||||
sense = _dev.PlextorReadCdDa(out subBuf, out senseBuf, firstSectorToRead, subSize, blocksToRead,
|
||||
sense = _dev.PlextorReadCdDa(out byte[] subBuf, out senseBuf, firstSectorToRead, subSize, blocksToRead,
|
||||
supportedPlextorSubchannel == PlextorSubchannel.Pack ? PlextorSubchannel.All
|
||||
: supportedPlextorSubchannel, 0, out cmdDuration);
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ partial class Dump
|
||||
byte[] readBuffer;
|
||||
Modes.DecodedMode? decMode = null;
|
||||
Dictionary<MediaTagType, byte[]> mediaTags = new();
|
||||
byte[] cmdBuf;
|
||||
bool ret;
|
||||
|
||||
if(_outputPlugin is not IWritableImage outputFormat)
|
||||
@@ -89,7 +88,7 @@ partial class Dump
|
||||
_dumpLog.WriteLine("Requesting MODE SENSE (6).");
|
||||
UpdateStatus?.Invoke("Requesting MODE SENSE (6).");
|
||||
|
||||
sense = _dev.ModeSense6(out cmdBuf, out _, true, ScsiModeSensePageControl.Current, 0x3F, 5, out _);
|
||||
sense = _dev.ModeSense6(out byte[] cmdBuf, out _, true, ScsiModeSensePageControl.Current, 0x3F, 5, out _);
|
||||
|
||||
if(!sense &&
|
||||
!_dev.Error &&
|
||||
|
||||
@@ -388,9 +388,7 @@ partial class Dump
|
||||
{
|
||||
if(outputFormat is IWritableOpticalImage opticalPlugin)
|
||||
{
|
||||
byte[] readBuffer;
|
||||
|
||||
sense = _dev.ReadDiscInformation(out readBuffer, out _, MmcDiscInformationDataTypes.DiscInformation,
|
||||
sense = _dev.ReadDiscInformation(out byte[] readBuffer, out _, MmcDiscInformationDataTypes.DiscInformation,
|
||||
_dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
|
||||
@@ -221,8 +221,6 @@ public sealed partial class DeviceReport
|
||||
{
|
||||
Modes.DecodedMode? decMode = null;
|
||||
PeripheralDeviceTypes devType = _dev.ScsiType;
|
||||
byte[] mode10Buffer;
|
||||
byte[] mode6Buffer;
|
||||
bool sense;
|
||||
mediumType = 0;
|
||||
|
||||
@@ -240,7 +238,7 @@ public sealed partial class DeviceReport
|
||||
{
|
||||
var saveBuffer = false;
|
||||
|
||||
sense = _dev.ModeSense10(out mode10Buffer, out _, false, true, pageControl, 0x3F, 0xFF, _dev.Timeout,
|
||||
sense = _dev.ModeSense10(out byte[] mode10Buffer, out _, false, true, pageControl, 0x3F, 0xFF, _dev.Timeout,
|
||||
out _);
|
||||
|
||||
if(sense || _dev.Error)
|
||||
@@ -321,7 +319,7 @@ public sealed partial class DeviceReport
|
||||
})
|
||||
{
|
||||
var saveBuffer = false;
|
||||
sense = _dev.ModeSense6(out mode6Buffer, out _, true, pageControl, 0x3F, 0xFF, _dev.Timeout, out _);
|
||||
sense = _dev.ModeSense6(out byte[] mode6Buffer, out _, true, pageControl, 0x3F, 0xFF, _dev.Timeout, out _);
|
||||
|
||||
if(sense || _dev.Error)
|
||||
{
|
||||
|
||||
@@ -1606,7 +1606,6 @@ public static class CompactDisc
|
||||
foreach(int sector in subchannelExtents)
|
||||
{
|
||||
Track track = tracks.LastOrDefault(t => (int)t.StartSector <= sector);
|
||||
byte trkFlags;
|
||||
byte flags;
|
||||
ulong trackStart;
|
||||
ulong pregap;
|
||||
@@ -1627,7 +1626,7 @@ public static class CompactDisc
|
||||
pregap = track.Pregap;
|
||||
}
|
||||
|
||||
if(!trackFlags.TryGetValue((byte)(track?.Sequence ?? 0), out trkFlags) &&
|
||||
if(!trackFlags.TryGetValue((byte)(track?.Sequence ?? 0), out byte trkFlags) &&
|
||||
track?.Type != TrackType.Audio)
|
||||
flags = (byte)CdFlags.DataTrack;
|
||||
else
|
||||
|
||||
@@ -293,7 +293,6 @@ public static class MMC
|
||||
{
|
||||
uint startOfFirstDataTrack = uint.MaxValue;
|
||||
DI.DiscInformation? blurayDi = null;
|
||||
byte[] cmdBuf;
|
||||
bool sense;
|
||||
byte secondSessionFirstTrack = 0;
|
||||
byte[] sector0;
|
||||
@@ -309,7 +308,7 @@ public static class MMC
|
||||
hiddenTrack = false;
|
||||
hiddenData = false;
|
||||
|
||||
sense = dev.GetConfiguration(out cmdBuf, out _, 0, MmcGetConfigurationRt.Current, dev.Timeout, out _);
|
||||
sense = dev.GetConfiguration(out byte[] cmdBuf, out _, 0, MmcGetConfigurationRt.Current, dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
|
||||
@@ -299,9 +299,7 @@ public sealed partial class Sidecar
|
||||
xmlTrk.StartSector = trk.StartSector;
|
||||
xmlTrk.EndSector = trk.EndSector;
|
||||
|
||||
int idx0;
|
||||
|
||||
if(trk.Indexes?.TryGetValue(0, out idx0) == true &&
|
||||
if(trk.Indexes?.TryGetValue(0, out int idx0) == true &&
|
||||
idx0 >= 0)
|
||||
xmlTrk.StartSector = (ulong)idx0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user