Simplify IDictionary accesses.

This commit is contained in:
2023-10-04 09:48:08 +01:00
parent 58394ad73d
commit d3efb58222
2 changed files with 4 additions and 8 deletions

View File

@@ -638,12 +638,9 @@ public static class FullTOC
toc.LastCompleteSession = (byte)track.Session;
}
if(!sessionEndingTrack.ContainsKey(toc.LastCompleteSession))
{
sessionEndingTrack[toc.LastCompleteSession] = (byte)tracks.
Where(t => t.Session == toc.LastCompleteSession).
Max(t => t.Sequence);
}
sessionEndingTrack.TryAdd(toc.LastCompleteSession, (byte)tracks.
Where(t => t.Session == toc.LastCompleteSession).
Max(t => t.Sequence));
byte currentSession = 0;