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