REFACTOR: Invert 'if' statement to reduce nesting.

This commit is contained in:
2017-12-21 06:06:19 +00:00
parent 9cd1869d1d
commit 4d886dae25
138 changed files with 9447 additions and 9806 deletions

View File

@@ -453,17 +453,16 @@ namespace DiscImageChef.DiscImages
string _line = cueStream.ReadLine();
matchTrack = regexTrack.Match(_line);
if(matchTrack.Success)
{
uint trackSeq = uint.Parse(matchTrack.Groups[1].Value);
if(trackCount + 1 != trackSeq)
throw new
FeatureUnsupportedImageException(string
.Format("Found TRACK {0} out of order in line {1}",
trackSeq, line));
if(!matchTrack.Success) continue;
trackCount++;
}
uint trackSeq = uint.Parse(matchTrack.Groups[1].Value);
if(trackCount + 1 != trackSeq)
throw new
FeatureUnsupportedImageException(string
.Format("Found TRACK {0} out of order in line {1}",
trackSeq, line));
trackCount++;
}
if(trackCount == 0) throw new FeatureUnsupportedImageException("No tracks found");