Move declarations closer to usage.

This commit is contained in:
2023-10-05 02:37:04 +01:00
parent 214d210979
commit 13a2bfdaf4
6 changed files with 7 additions and 8 deletions

View File

@@ -169,12 +169,12 @@ public class TeleDiskLzh
/// <returns>Number of decompressed bytes</returns>
public int Decode(out byte[] buf, int len) /* Decoding/Uncompressing */
{
short c;
buf = new byte[len];
int count; // was an unsigned long, seems unnecessary
for(count = 0; count < len;)
{
short c;
if(_tdctl.Bufcnt == 0)
{
if((c = DecodeChar()) < 0)

View File

@@ -712,12 +712,11 @@ public class Nes : IByteAddressableImage
var foundMapper = false;
var foundSubMapper = false;
Regex regex;
Match match;
// Sanitize
foreach(LinearMemoryDevice map in mappings.Devices)
{
Regex regex;
Match match;
switch(map.Type)
{
case LinearMemoryType.ROM when !foundRom:

View File

@@ -184,7 +184,6 @@ sealed class DecodeCommand : Command
Statistics.AddMediaFormat(inputFormat.Format);
Statistics.AddMedia(inputFormat.Info.MediaType, false);
Statistics.AddFilter(inputFilter.Name);
ErrorNumber errno;
if(diskTags)
{
@@ -194,6 +193,7 @@ sealed class DecodeCommand : Command
{
foreach(MediaTagType tag in inputFormat.Info.ReadableMediaTags)
{
ErrorNumber errno;
switch(tag)
{
case MediaTagType.SCSI_INQUIRY: