mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Replace if statement with null-propagating code.
This commit is contained in:
@@ -359,18 +359,15 @@ namespace DiscImageChef.DiscImages
|
||||
if(rsrcFork.ContainsKey(0x434B534D))
|
||||
{
|
||||
Resource cksmRsrc = rsrcFork.GetResource(0x434B534D);
|
||||
if(cksmRsrc != null)
|
||||
if(cksmRsrc?.ContainsId(1) == true)
|
||||
{
|
||||
if(cksmRsrc.ContainsId(1))
|
||||
{
|
||||
byte[] tagChk = cksmRsrc.GetResource(1);
|
||||
tagChecksum = BigEndianBitConverter.ToUInt32(tagChk, 0);
|
||||
}
|
||||
if(cksmRsrc.ContainsId(2))
|
||||
{
|
||||
byte[] dataChk = cksmRsrc.GetResource(1);
|
||||
dataChecksum = BigEndianBitConverter.ToUInt32(dataChk, 0);
|
||||
}
|
||||
byte[] tagChk = cksmRsrc.GetResource(1);
|
||||
tagChecksum = BigEndianBitConverter.ToUInt32(tagChk, 0);
|
||||
}
|
||||
if(cksmRsrc?.ContainsId(2) == true)
|
||||
{
|
||||
byte[] dataChk = cksmRsrc.GetResource(1);
|
||||
dataChecksum = BigEndianBitConverter.ToUInt32(dataChk, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user