mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Invert 'if' statement to reduce nesting.
This commit is contained in:
@@ -370,13 +370,12 @@ namespace DiscImageChef.Core
|
||||
chks.Add(chk);
|
||||
}
|
||||
|
||||
if(enabled.HasFlag(EnableChecksum.SpamSum))
|
||||
{
|
||||
chk = new ChecksumType();
|
||||
chk.type = ChecksumTypeType.spamsum;
|
||||
chk.Value = ssctx.End();
|
||||
chks.Add(chk);
|
||||
}
|
||||
if(!enabled.HasFlag(EnableChecksum.SpamSum)) return chks;
|
||||
|
||||
chk = new ChecksumType();
|
||||
chk.type = ChecksumTypeType.spamsum;
|
||||
chk.Value = ssctx.End();
|
||||
chks.Add(chk);
|
||||
|
||||
return chks;
|
||||
}
|
||||
@@ -617,13 +616,12 @@ namespace DiscImageChef.Core
|
||||
dataChecksums.Add(chk);
|
||||
}
|
||||
|
||||
if(enabled.HasFlag(EnableChecksum.SpamSum))
|
||||
{
|
||||
chk = new ChecksumType();
|
||||
chk.type = ChecksumTypeType.spamsum;
|
||||
chk.Value = ssctxData.End();
|
||||
dataChecksums.Add(chk);
|
||||
}
|
||||
if(!enabled.HasFlag(EnableChecksum.SpamSum)) return dataChecksums;
|
||||
|
||||
chk = new ChecksumType();
|
||||
chk.type = ChecksumTypeType.spamsum;
|
||||
chk.Value = ssctxData.End();
|
||||
dataChecksums.Add(chk);
|
||||
|
||||
return dataChecksums;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user