Inline variable declarations

This commit is contained in:
Jason Nelson
2020-07-30 16:45:38 -07:00
parent a7944f28c5
commit 6bdf2365fc
2 changed files with 10 additions and 21 deletions

View File

@@ -791,22 +791,14 @@ namespace SharpCompress.Common.SevenZip
#endif
try
{
long dataStartPos;
List<long> packSizes;
List<uint?> packCrCs;
List<CFolder> folders;
List<int> numUnpackStreamsInFolders;
List<long> unpackSizes;
List<uint?> digests;
ReadStreamsInfo(null,
out dataStartPos,
out packSizes,
out packCrCs,
out folders,
out numUnpackStreamsInFolders,
out unpackSizes,
out digests);
out long dataStartPos,
out List<long> packSizes,
out List<uint?> packCrCs,
out List<CFolder> folders,
out List<int> numUnpackStreamsInFolders,
out List<long> unpackSizes,
out List<uint?> digests);
dataStartPos += baseOffset;
@@ -1445,8 +1437,7 @@ namespace SharpCompress.Common.SevenZip
private Stream GetCachedDecoderStream(ArchiveDatabase db, int folderIndex)
{
Stream s;
if (!_cachedStreams.TryGetValue(folderIndex, out s))
if (!_cachedStreams.TryGetValue(folderIndex, out Stream s))
{
CFolder folderInfo = db._folders[folderIndex];
int packStreamIndex = db._folders[folderIndex]._firstPackStreamId;

View File

@@ -235,9 +235,8 @@ namespace SharpCompress
byte[] array = GetTransferByteArray();
try
{
int count;
long total = 0;
while (ReadTransferBlock(source, array, out count))
while (ReadTransferBlock(source, array, out int count))
{
total += count;
destination.Write(array, 0, count);
@@ -255,10 +254,9 @@ namespace SharpCompress
byte[] array = GetTransferByteArray();
try
{
int count;
var iterations = 0;
long total = 0;
while (ReadTransferBlock(source, array, out count))
while (ReadTransferBlock(source, array, out int count))
{
total += count;
destination.Write(array, 0, count);