mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
Simplify IDictionary accesses.
This commit is contained in:
@@ -638,12 +638,9 @@ public static class FullTOC
|
||||
toc.LastCompleteSession = (byte)track.Session;
|
||||
}
|
||||
|
||||
if(!sessionEndingTrack.ContainsKey(toc.LastCompleteSession))
|
||||
{
|
||||
sessionEndingTrack[toc.LastCompleteSession] = (byte)tracks.
|
||||
sessionEndingTrack.TryAdd(toc.LastCompleteSession, (byte)tracks.
|
||||
Where(t => t.Session == toc.LastCompleteSession).
|
||||
Max(t => t.Sequence);
|
||||
}
|
||||
Max(t => t.Sequence));
|
||||
|
||||
byte currentSession = 0;
|
||||
|
||||
|
||||
@@ -340,8 +340,7 @@ public static class Sense
|
||||
|
||||
Array.Copy(sense, offset, desc, 0, descLen);
|
||||
|
||||
if(!decoded.Descriptors.ContainsKey(descType))
|
||||
decoded.Descriptors.Add(descType, desc);
|
||||
decoded.Descriptors.TryAdd(descType, desc);
|
||||
|
||||
offset += descLen;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user