mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Invert 'if' statement to reduce nesting.
This commit is contained in:
@@ -465,22 +465,21 @@ namespace DiscImageChef.Core
|
||||
foreach(Filesystem plugin in plugins.PluginsList.Values)
|
||||
try
|
||||
{
|
||||
if(plugin.Identify(image, partitions[i]))
|
||||
{
|
||||
plugin.GetInformation(image, partitions[i], out string foo);
|
||||
lstFs.Add(plugin.XmlFSType);
|
||||
Statistics.AddFilesystem(plugin.XmlFSType.Type);
|
||||
if(!plugin.Identify(image, partitions[i])) continue;
|
||||
|
||||
switch(plugin.XmlFSType.Type) {
|
||||
case "Opera": dskType = MediaType.ThreeDO;
|
||||
break;
|
||||
case "PC Engine filesystem": dskType = MediaType.SuperCDROM2;
|
||||
break;
|
||||
case "Nintendo Wii filesystem": dskType = MediaType.WOD;
|
||||
break;
|
||||
case "Nintendo Gamecube filesystem": dskType = MediaType.GOD;
|
||||
break;
|
||||
}
|
||||
plugin.GetInformation(image, partitions[i], out string foo);
|
||||
lstFs.Add(plugin.XmlFSType);
|
||||
Statistics.AddFilesystem(plugin.XmlFSType.Type);
|
||||
|
||||
switch(plugin.XmlFSType.Type) {
|
||||
case "Opera": dskType = MediaType.ThreeDO;
|
||||
break;
|
||||
case "PC Engine filesystem": dskType = MediaType.SuperCDROM2;
|
||||
break;
|
||||
case "Nintendo Wii filesystem": dskType = MediaType.WOD;
|
||||
break;
|
||||
case "Nintendo Gamecube filesystem": dskType = MediaType.GOD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
@@ -513,22 +512,21 @@ namespace DiscImageChef.Core
|
||||
foreach(Filesystem plugin in plugins.PluginsList.Values)
|
||||
try
|
||||
{
|
||||
if(plugin.Identify(image, xmlPart))
|
||||
{
|
||||
plugin.GetInformation(image, xmlPart, out string foo);
|
||||
lstFs.Add(plugin.XmlFSType);
|
||||
Statistics.AddFilesystem(plugin.XmlFSType.Type);
|
||||
if(!plugin.Identify(image, xmlPart)) continue;
|
||||
|
||||
switch(plugin.XmlFSType.Type) {
|
||||
case "Opera": dskType = MediaType.ThreeDO;
|
||||
break;
|
||||
case "PC Engine filesystem": dskType = MediaType.SuperCDROM2;
|
||||
break;
|
||||
case "Nintendo Wii filesystem": dskType = MediaType.WOD;
|
||||
break;
|
||||
case "Nintendo Gamecube filesystem": dskType = MediaType.GOD;
|
||||
break;
|
||||
}
|
||||
plugin.GetInformation(image, xmlPart, out string foo);
|
||||
lstFs.Add(plugin.XmlFSType);
|
||||
Statistics.AddFilesystem(plugin.XmlFSType.Type);
|
||||
|
||||
switch(plugin.XmlFSType.Type) {
|
||||
case "Opera": dskType = MediaType.ThreeDO;
|
||||
break;
|
||||
case "PC Engine filesystem": dskType = MediaType.SuperCDROM2;
|
||||
break;
|
||||
case "Nintendo Wii filesystem": dskType = MediaType.WOD;
|
||||
break;
|
||||
case "Nintendo Gamecube filesystem": dskType = MediaType.GOD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
|
||||
Reference in New Issue
Block a user